forked from bblanchon/ArduinoJson
Use delete instead of hiding copy constructors and assignments (#1820)
This commit is contained in:
1 parent
33a4773fbd
commit
b2b995edb3
5 files changed
+9
-15
No files matched your search
@@ -8,6 +8,8 @@
|
||||
class CustomWriter {
|
||||
public:
|
||||
CustomWriter() {}
|
||||
CustomWriter(const CustomWriter&) = delete;
|
||||
CustomWriter& operator=(const CustomWriter&) = delete;
|
||||
|
||||
size_t write(uint8_t c) {
|
||||
_str.append(1, static_cast<char>(c));
|
||||
@@ -24,9 +26,6 @@ class CustomWriter {
|
||||
}
|
||||
|
||||
private:
|
||||
CustomWriter(const CustomWriter&); // non-copiable
|
||||
CustomWriter& operator=(const CustomWriter&);
|
||||
|
||||
std::string _str;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user