[Bf-blender-cvs] [2ae39ff6b1] master: Fix strict compiler warning in the gflags code
Sergey Sharybin
noreply at git.blender.org
Mon Jan 23 11:52:53 CET 2017
Commit: 2ae39ff6b192b259e6a2c593d72a9c9008a029c4
Author: Sergey Sharybin
Date: Mon Jan 23 11:52:41 2017 +0100
Branches: master
https://developer.blender.org/rB2ae39ff6b192b259e6a2c593d72a9c9008a029c4
Fix strict compiler warning in the gflags code
===================================================================
M extern/gflags/README.blender
M extern/gflags/src/gflags.cc
===================================================================
diff --git a/extern/gflags/README.blender b/extern/gflags/README.blender
index 0c8ea9a2be..b48d4d5d11 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 7abe1f70da..6dcc5170bc 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;
More information about the Bf-blender-cvs
mailing list