Replaced non-const references by pointer to follow Google style guide

This commit is contained in:
Benoit Blanchon
2014-10-11 16:58:24 +02:00
parent 35eaa55b3a
commit b49aa22c65
12 changed files with 51 additions and 48 deletions

View File

@ -21,25 +21,25 @@ static inline char getSpecialChar(char c)
return p[1];
}
static inline size_t printCharTo(char c, Print& p)
static inline size_t printCharTo(char c, Print* p)
{
char specialChar = getSpecialChar(c);
return specialChar != 0
? p.write('\\') + p.write(specialChar)
: p.write(c);
? p->write('\\') + p->write(specialChar)
: p->write(c);
}
size_t EscapedString::printTo(const char* s, Print& p)
size_t EscapedString::printTo(const char* s, Print* p)
{
if (!s) return p.print("null");
if (!s) return p->print("null");
size_t n = p.write('\"');
size_t n = p->write('\"');
while (*s)
{
n += printCharTo(*s++, p);
}
return n + p.write('\"');
return n + p->write('\"');
}