File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,7 @@ struct MyHandler {
16
16
const char * type;
17
17
std::string data;
18
18
19
- MyHandler () : type(), data() { Null (); }
20
- MyHandler (const MyHandler& cpy) : type(cpy.type),data(cpy.data) {}
21
- MyHandler& operator =(const MyHandler& cpy) {
22
- type = cpy.type ;
23
- data = cpy.data ;
24
- return *this ;
25
- }
19
+ MyHandler () : type(), data() {}
26
20
27
21
bool Null () { type = " Null" ; data.clear (); return true ; }
28
22
bool Bool (bool b) { type = " Bool:" ; data = b? " true" : " false" ; return true ; }
@@ -38,6 +32,9 @@ struct MyHandler {
38
32
bool EndObject (SizeType memberCount) { type = " EndObject:" ; data = stringify (memberCount); return true ; }
39
33
bool StartArray () { type = " StartArray" ; data.clear (); return true ; }
40
34
bool EndArray (SizeType elementCount) { type = " EndArray:" ; data = stringify (elementCount); return true ; }
35
+ private:
36
+ MyHandler (const MyHandler& noCopyConstruction);
37
+ MyHandler& operator =(const MyHandler& noAssignment);
41
38
};
42
39
43
40
int main () {
You can’t perform that action at this time.
0 commit comments