COMMON: New overloads for char and void* for the stream debug interface.

This commit is contained in:
Giulio Camuffo 2011-09-14 22:50:18 +02:00
parent b89fb79216
commit 25b3704c68
2 changed files with 12 additions and 0 deletions

View file

@ -87,6 +87,11 @@ Debug &Debug::operator<<(const char *str) {
return maybeSpace();
}
Debug &Debug::operator<<(char str) {
_stream->msg += str;
return maybeSpace();
}
Debug &Debug::operator<<(int num) {
_stream->msg += String::format("%d", num);
return maybeSpace();
@ -102,6 +107,11 @@ Debug &Debug::operator<<(bool value) {
return maybeSpace();
}
Debug &Debug::operator<<(void *p) {
_stream->msg += String::format("%p", p);
return maybeSpace();
}
Debug &Debug::operator=(const Debug &other) {
_stream = other._stream;
++_stream->ref;