mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Renamed private methods
This commit is contained in:
		| @@ -7,12 +7,12 @@ | ||||
| #include <cstdio> | ||||
| #include <cstring> | ||||
|  | ||||
| size_t JsonValue::printBooleanTo(Print& p) const | ||||
| size_t JsonValue::printBoolTo(Print& p) const | ||||
| { | ||||
|     return p.write(content.asBool ? "true" : "false"); | ||||
| } | ||||
|  | ||||
| size_t JsonValue::printNumberTo(Print& p) const | ||||
| size_t JsonValue::printDoubleTo(Print& p) const | ||||
| { | ||||
|     char tmp[16]; | ||||
|  | ||||
| @@ -21,7 +21,7 @@ size_t JsonValue::printNumberTo(Print& p) const | ||||
|     return p.write(tmp); | ||||
| } | ||||
|  | ||||
| size_t JsonValue::printObjectTo(Print& p) const | ||||
| size_t JsonValue::printPrintableTo(Print& p) const | ||||
| { | ||||
|     if (content.asPrintable) | ||||
|         return ((Printable*) content.asPrintable)->printTo(p); | ||||
|   | ||||
| @@ -23,19 +23,19 @@ public: | ||||
|     } | ||||
|  | ||||
|     JsonValue(double value) | ||||
|         : implementation(&JsonValue::printNumberTo) | ||||
|         : implementation(&JsonValue::printDoubleTo) | ||||
|     { | ||||
|         content.asDouble = value; | ||||
|     } | ||||
|  | ||||
|     JsonValue(bool value) | ||||
|         : implementation(&JsonValue::printBooleanTo) | ||||
|         : implementation(&JsonValue::printBoolTo) | ||||
|     { | ||||
|         content.asBool = value; | ||||
|     } | ||||
|  | ||||
|     JsonValue(Printable& value) | ||||
|         : implementation(&JsonValue::printObjectTo) | ||||
|         : implementation(&JsonValue::printPrintableTo) | ||||
|     { | ||||
|         content.asPrintable = &value; | ||||
|     } | ||||
| @@ -60,8 +60,8 @@ private: | ||||
|  | ||||
|     size_t(JsonValue::*implementation)(Print& p)const; | ||||
|  | ||||
|     size_t printBooleanTo(Print& p) const; | ||||
|     size_t printNumberTo(Print& p) const; | ||||
|     size_t printObjectTo(Print& p) const; | ||||
|     size_t printBoolTo(Print& p) const; | ||||
|     size_t printDoubleTo(Print& p) const; | ||||
|     size_t printPrintableTo(Print& p) const; | ||||
|     size_t printStringTo(Print& p) const; | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user