diff options
author | Chris Mumford <cmumford@google.com> | 2019-05-02 11:01:00 -0700 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2019-05-02 19:04:50 -0700 |
commit | 297e66afc1dda3f3d7a7cc2022030164c302cb7a (patch) | |
tree | c7266d464e3b361a8f580ebe1e67c128e7e2a712 /include/leveldb/env.h | |
parent | 3724030179716fd8d95cf79339884c49afade8f9 (diff) | |
download | leveldb-297e66afc1dda3f3d7a7cc2022030164c302cb7a.tar.gz |
Format all files IAW the Google C++ Style Guide.
Use clang-format to correct formatting to be in agreement with the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html). Doing this simplifies the process of accepting changes. Also fixed a few warnings flagged by clang-tidy.
PiperOrigin-RevId: 246350737
Diffstat (limited to 'include/leveldb/env.h')
-rw-r--r-- | include/leveldb/env.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/include/leveldb/env.h b/include/leveldb/env.h index ea728c9..112fe96 100644 --- a/include/leveldb/env.h +++ b/include/leveldb/env.h @@ -15,8 +15,10 @@ #include <stdarg.h> #include <stdint.h> + #include <string> #include <vector> + #include "leveldb/export.h" #include "leveldb/status.h" @@ -164,9 +166,7 @@ class LEVELDB_EXPORT Env { // added to the same Env may run concurrently in different threads. // I.e., the caller may not assume that background work items are // serialized. - virtual void Schedule( - void (*function)(void* arg), - void* arg) = 0; + virtual void Schedule(void (*function)(void* arg), void* arg) = 0; // Start a new thread, invoking "function(arg)" within the new thread. // When "function(arg)" returns, the thread will be destroyed. @@ -287,9 +287,9 @@ class LEVELDB_EXPORT FileLock { // Log the specified data to *info_log if info_log is non-null. void Log(Logger* info_log, const char* format, ...) -# if defined(__GNUC__) || defined(__clang__) - __attribute__((__format__ (__printf__, 2, 3))) -# endif +#if defined(__GNUC__) || defined(__clang__) + __attribute__((__format__(__printf__, 2, 3))) +#endif ; // A utility routine: write "data" to the named file. @@ -306,7 +306,7 @@ LEVELDB_EXPORT Status ReadFileToString(Env* env, const std::string& fname, class LEVELDB_EXPORT EnvWrapper : public Env { public: // Initialize an EnvWrapper that delegates all calls to *t. - explicit EnvWrapper(Env* t) : target_(t) { } + explicit EnvWrapper(Env* t) : target_(t) {} virtual ~EnvWrapper(); // Return the target to which this Env forwards all calls. @@ -364,9 +364,7 @@ class LEVELDB_EXPORT EnvWrapper : public Env { Status NewLogger(const std::string& fname, Logger** result) override { return target_->NewLogger(fname, result); } - uint64_t NowMicros() override { - return target_->NowMicros(); - } + uint64_t NowMicros() override { return target_->NowMicros(); } void SleepForMicroseconds(int micros) override { target_->SleepForMicroseconds(micros); } |