From 23348465a02c9fdbdecce01cee24e62b9f1f5bad Mon Sep 17 00:00:00 2001 From: Sumit Gupta Date: Thu, 5 Oct 2017 08:50:56 -0700 Subject: Removed unused functions. --- src/gflags.cc | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/gflags.cc b/src/gflags.cc index 05aa40b..9869782 100644 --- a/src/gflags.cc +++ b/src/gflags.cc @@ -225,7 +225,6 @@ 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; // Calls the given validate-fn on value_buffer_, and returns // whatever it returns. But first casts validate_fn_proto to a @@ -485,23 +484,6 @@ void FlagValue::CopyFrom(const FlagValue& x) { } } -int FlagValue::ValueSize() const { - if (type_ > FV_MAX_INDEX) { - assert(false); // unknown type - return 0; - } - static const uint8 valuesize[] = { - sizeof(bool), - sizeof(int32), - sizeof(uint32), - sizeof(int64), - sizeof(uint64), - sizeof(double), - sizeof(string), - }; - return valuesize[type_]; -} - // -------------------------------------------------------------------- // CommandLineFlag // This represents a single flag, including its name, description, @@ -960,7 +942,6 @@ class CommandLineFlagParser { // Stage 3: validate all the commandline flags that have validators // registered and were not set/modified by ParseNewCommandLineFlags. void ValidateFlags(bool all); - void ValidateAllFlags(); void ValidateUnmodifiedFlags(); // Stage 4: report any errors and return true if any were found. @@ -1245,10 +1226,6 @@ void CommandLineFlagParser::ValidateFlags(bool all) { } } -void CommandLineFlagParser::ValidateAllFlags() { - ValidateFlags(true); -} - void CommandLineFlagParser::ValidateUnmodifiedFlags() { ValidateFlags(false); } -- cgit v1.2.3