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.
This commit is contained in:
5
extern/gflags/README.blender
vendored
5
extern/gflags/README.blender
vendored
@@ -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.
|
||||
|
||||
6
extern/gflags/src/gflags.cc
vendored
6
extern/gflags/src/gflags.cc
vendored
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
2
extern/gflags/src/gflags_completions.cc
vendored
2
extern/gflags/src/gflags_completions.cc
vendored
@@ -55,8 +55,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "gflags_completions.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "gflags/gflags.h"
|
||||
#include "gflags/gflags_completions.h"
|
||||
|
||||
Reference in New Issue
Block a user