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