OsmAnd
|
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <stdio.h>
#include <errno.h>
#include <vector>
#include "config.h"
#define DECLARE_STREAM_OPERATOR | ( | TYPE, | |
FORMAT | |||
) |
LogMessage& LogMessage::operator<<(TYPE value) { \ /* 128 bytes should be big enough for any of the primitive */ \ /* values which we print with this, but well use snprintf() */ \ /* anyway to be extra safe. */ \ char buffer[128]; \ snprintf(buffer, sizeof(buffer), FORMAT, value); \ /* Guard against broken MSVC snprintf(). */ \ buffer[sizeof(buffer)-1] = '\0'; \ message_ += buffer; \ return *this; \ }