From ab48e6355dfb279ac70f05637e5533548eea773a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 23 Mar 2018 14:32:18 +0100 Subject: Glog/gflags: Reduce amount of local modifications With better directory layout and more proper include statements we can avoid several local modifications, such as changing config.h for Windows Glog and the ones related on pass-through statements in logging headers in Glog. This commit also makes unused functions not-a-warning for external code. --- extern/gflags/README.blender | 5 ----- extern/gflags/src/gflags.cc | 6 +++--- extern/gflags/src/gflags_completions.cc | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-) (limited to 'extern/gflags') diff --git a/extern/gflags/README.blender b/extern/gflags/README.blender index 68dba114329..c57f5ce53ca 100644 --- a/extern/gflags/README.blender +++ b/extern/gflags/README.blender @@ -17,10 +17,5 @@ Local modifications: - Applied some modifications from fork https://github.com/Nazg-Gul/gflags.git (see https://github.com/gflags/gflags/pull/129) -- Made `google::{anonymous}::FlagValue::ValueSize() const` inlined, so it does - not trigger strict compiler warning. - -- Did the same for CommandLineFlagParser::ValidateFlags(). - - Ifdef-ed __attribute((unused)) in gflags.h. This file is compile-time configurable in upstream, so can not avoid change here. diff --git a/extern/gflags/src/gflags.cc b/extern/gflags/src/gflags.cc index 60965d3d201..f27079862f0 100644 --- a/extern/gflags/src/gflags.cc +++ b/extern/gflags/src/gflags.cc @@ -225,7 +225,7 @@ class FlagValue { bool Equal(const FlagValue& x) const; FlagValue* New() const; // creates a new one with default value void CopyFrom(const FlagValue& x); - inline int ValueSize() const; + int ValueSize() const; // Calls the given validate-fn on value_buffer_, and returns // whatever it returns. But first casts validate_fn_proto to a @@ -485,7 +485,7 @@ void FlagValue::CopyFrom(const FlagValue& x) { } } -inline int FlagValue::ValueSize() const { +int FlagValue::ValueSize() const { if (type_ > FV_MAX_INDEX) { assert(false); // unknown type return 0; @@ -1257,7 +1257,7 @@ void CommandLineFlagParser::ValidateFlags(bool all) { } } -inline void CommandLineFlagParser::ValidateAllFlags() { +void CommandLineFlagParser::ValidateAllFlags() { ValidateFlags(true); } diff --git a/extern/gflags/src/gflags_completions.cc b/extern/gflags/src/gflags_completions.cc index c663453c59c..f7724864d58 100644 --- a/extern/gflags/src/gflags_completions.cc +++ b/extern/gflags/src/gflags_completions.cc @@ -55,8 +55,6 @@ #include #include -#include "gflags_completions.h" - #include "config.h" #include "gflags/gflags.h" #include "gflags/gflags_completions.h" -- cgit v1.2.3