summaryrefslogtreecommitdiff
path: root/util/windows_logger.h
diff options
context:
space:
mode:
authorVictor Costan <costan@google.com>2020-04-29 22:31:41 +0000
committerVictor Costan <costan@google.com>2020-04-29 22:33:14 +0000
commita6b3a2012e9c598258a295aef74d88b796c47a2b (patch)
tree2ce49183e6a860db3e29909409ea884a4bec56d0 /util/windows_logger.h
parent3f934e3705444a3df80b128ddefc4cf440441ffe (diff)
downloadleveldb-a6b3a2012e9c598258a295aef74d88b796c47a2b.tar.gz
Add some std:: qualifiers to types and functions.
PiperOrigin-RevId: 309110431
Diffstat (limited to 'util/windows_logger.h')
-rw-r--r--util/windows_logger.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/windows_logger.h b/util/windows_logger.h
index 9296063..26e6c7b 100644
--- a/util/windows_logger.h
+++ b/util/windows_logger.h
@@ -27,7 +27,7 @@ class WindowsLogger final : public Logger {
~WindowsLogger() override { std::fclose(fp_); }
- void Logv(const char* format, va_list arguments) override {
+ void Logv(const char* format, std::va_list arguments) override {
// Record the time as close to the Logv() call as possible.
SYSTEMTIME now_components;
::GetLocalTime(&now_components);
@@ -56,7 +56,7 @@ class WindowsLogger final : public Logger {
(iteration == 0) ? stack_buffer : new char[dynamic_buffer_size];
// Print the header into the buffer.
- int buffer_offset = snprintf(
+ int buffer_offset = std::snprintf(
buffer, buffer_size, "%04d/%02d/%02d-%02d:%02d:%02d.%06d %s ",
now_components.wYear, now_components.wMonth, now_components.wDay,
now_components.wHour, now_components.wMinute, now_components.wSecond,
@@ -92,8 +92,8 @@ class WindowsLogger final : public Logger {
}
// The dynamically-allocated buffer was incorrectly sized. This should
- // not happen, assuming a correct implementation of (v)snprintf. Fail
- // in tests, recover by truncating the log message in production.
+ // not happen, assuming a correct implementation of std::(v)snprintf.
+ // Fail in tests, recover by truncating the log message in production.
assert(false);
buffer_offset = buffer_size - 1;
}