diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-23 13:52:41 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-23 13:52:41 +0300 |
commit | 2ae39ff6b192b259e6a2c593d72a9c9008a029c4 (patch) | |
tree | 674b507c052a46844a81d6505e7f4327dffbb8ba /extern/gflags | |
parent | 7b8810b01a2f378a45874da6676eaccf7c0b9626 (diff) |
Fix strict compiler warning in the gflags code
Diffstat (limited to 'extern/gflags')
-rw-r--r-- | extern/gflags/README.blender | 4 | ||||
-rw-r--r-- | extern/gflags/src/gflags.cc | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/extern/gflags/README.blender b/extern/gflags/README.blender index 0c8ea9a2be3..b48d4d5d110 100644 --- a/extern/gflags/README.blender +++ b/extern/gflags/README.blender @@ -18,6 +18,8 @@ Local modifications: - Applied some modifications from fork https://github.com/Nazg-Gul/gflags.git (see https://github.com/gflags/gflags/pull/129) -- Avoid attemot of acquiring mutex lock in FlagRegistry::GlobalRegistry when +- Avoid attempt of acquiring mutex lock in FlagRegistry::GlobalRegistry when doing static flags initialization. See d81dd2d in Blender repository. +- Made `google::{anonymous}::FlagValue::ValueSize() const` inlined, so it does + not trigger strict compiler warning.
\ No newline at end of file diff --git a/extern/gflags/src/gflags.cc b/extern/gflags/src/gflags.cc index 7abe1f70da3..6dcc5170bcc 100644 --- a/extern/gflags/src/gflags.cc +++ b/extern/gflags/src/gflags.cc @@ -218,7 +218,7 @@ class FlagValue { bool Equal(const FlagValue& x) const; FlagValue* New() const; // creates a new one with default value void CopyFrom(const FlagValue& x); - int ValueSize() const; + inline int ValueSize() const; // Calls the given validate-fn on value_buffer_, and returns // whatever it returns. But first casts validate_fn_proto to a @@ -443,7 +443,7 @@ void FlagValue::CopyFrom(const FlagValue& x) { } } -int FlagValue::ValueSize() const { +inline int FlagValue::ValueSize() const { if (type_ > FV_MAX_INDEX) { assert(false); // unknown type return 0; |