forked from organicmaps/organicmaps
[alohalytics] nullptr support in the log.
This commit is contained in:
parent
aa72055dc5
commit
f89ba4e40c
1 changed files with 9 additions and 0 deletions
|
@ -95,6 +95,15 @@ class Logger {
|
|||
}
|
||||
}
|
||||
|
||||
// Specialization to work with nullptr
|
||||
void Log(const char * t) {
|
||||
if (t) {
|
||||
out_ << t;
|
||||
} else {
|
||||
out_ << "<NULL>";
|
||||
}
|
||||
}
|
||||
|
||||
// Pretty-printing for containers.
|
||||
template <template <typename, typename...> class ContainerType, typename ValueType, typename... Args>
|
||||
void Log(const ContainerType<ValueType, Args...> & c) {
|
||||
|
|
Loading…
Add table
Reference in a new issue