Reduced code size

This commit is contained in:
Benoit Blanchon
2014-08-26 12:11:17 +02:00
parent b3b70b78cf
commit 57f28c2017
2 changed files with 9 additions and 9 deletions

View File

@ -34,7 +34,7 @@ size_t IndentedPrint::write(uint8_t c)
return n; return n;
} }
size_t IndentedPrint::writeTabs() inline size_t IndentedPrint::writeTabs()
{ {
size_t n = 0; size_t n = 0;

View File

@ -14,7 +14,7 @@ size_t JsonPrettyPrint::write(uint8_t c)
return n; return n;
} }
size_t JsonPrettyPrint::handleStringChar(uint8_t c) inline size_t JsonPrettyPrint::handleStringChar(uint8_t c)
{ {
bool isQuote = c == '"' && previousChar != '\\'; bool isQuote = c == '"' && previousChar != '\\';
@ -23,7 +23,7 @@ size_t JsonPrettyPrint::handleStringChar(uint8_t c)
return sink.write(c); return sink.write(c);
} }
size_t JsonPrettyPrint::handleMarkupChar(uint8_t c) inline size_t JsonPrettyPrint::handleMarkupChar(uint8_t c)
{ {
switch (c) switch (c)
{ {
@ -49,33 +49,33 @@ size_t JsonPrettyPrint::handleMarkupChar(uint8_t c)
} }
} }
size_t JsonPrettyPrint::handleBlockOpen(uint8_t c) inline size_t JsonPrettyPrint::handleBlockOpen(uint8_t c)
{ {
return indentIfNeeded() + sink.write(c); return indentIfNeeded() + sink.write(c);
} }
size_t JsonPrettyPrint::handleBlockClose(uint8_t c) inline size_t JsonPrettyPrint::handleBlockClose(uint8_t c)
{ {
return unindentIfNeeded() + sink.write(c); return unindentIfNeeded() + sink.write(c);
} }
size_t JsonPrettyPrint::handleColumn() inline size_t JsonPrettyPrint::handleColumn()
{ {
return sink.write(':') + sink.write(' '); return sink.write(':') + sink.write(' ');
} }
size_t JsonPrettyPrint::handleComma() inline size_t JsonPrettyPrint::handleComma()
{ {
return sink.write(',') + sink.println(); return sink.write(',') + sink.println();
} }
size_t JsonPrettyPrint::handleQuoteOpen() inline size_t JsonPrettyPrint::handleQuoteOpen()
{ {
inString = true; inString = true;
return indentIfNeeded() + sink.write('"'); return indentIfNeeded() + sink.write('"');
} }
size_t JsonPrettyPrint::handleNormalChar(uint8_t c) inline size_t JsonPrettyPrint::handleNormalChar(uint8_t c)
{ {
return indentIfNeeded() + sink.write(c); return indentIfNeeded() + sink.write(c);
} }