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:
Sergey Sharybin
2018-03-23 14:32:18 +01:00
parent 60712d12eb
commit ab48e6355d
17 changed files with 22 additions and 60 deletions

View File

@@ -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.

View File

@@ -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);
}

View File

@@ -55,8 +55,6 @@
#include <utility>
#include <vector>
#include "gflags_completions.h"
#include "config.h"
#include "gflags/gflags.h"
#include "gflags/gflags_completions.h"