mirror of
https://github.com/gflags/gflags.git
synced 2025-04-06 22:15:02 +00:00
Now I can get rid of the old constructor!
R=jkline,ncalvin DELTA=28 (0 added, 27 deleted, 1 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=3169 git-svn-id: https://gflags.googlecode.com/svn/trunk@65 6586e3c6-dcc4-952a-343f-ff74eb82781d
This commit is contained in:
parent
6b70a75081
commit
9bf7e65f08
3 changed files with 2 additions and 31 deletions
|
@ -1422,25 +1422,6 @@ FlagRegisterer::FlagRegisterer(const char* name, const char* type,
|
|||
FlagRegistry::GlobalRegistry()->RegisterFlag(flag); // default registry
|
||||
}
|
||||
|
||||
// TODO(csilvers): remove this by 1 Sept 2011.
|
||||
FlagRegisterer::FlagRegisterer(const char* name, const char* type,
|
||||
const char* help, const char* filename,
|
||||
void* current_storage, void* defvalue_storage) {
|
||||
if (help == NULL)
|
||||
help = "";
|
||||
// FlagValue expects the type-name to not include any namespace
|
||||
// components, so we get rid of those, if any.
|
||||
if (strchr(type, ':'))
|
||||
type = strrchr(type, ':') + 1;
|
||||
FlagValue* current = new FlagValue(current_storage, type, false);
|
||||
FlagValue* defvalue = new FlagValue(defvalue_storage, type, false);
|
||||
// Importantly, flag_ will never be deleted, so storage is always good.
|
||||
CommandLineFlag* flag = new CommandLineFlag(name, help, filename,
|
||||
NULL, current, defvalue);
|
||||
FlagRegistry::GlobalRegistry()->RegisterFlag(flag); // default registry
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// GetAllFlags()
|
||||
// The main way the FlagRegistry class exposes its data. This
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <gflags/gflags_declare.h> // IWYU pragma: export
|
||||
#include <gflags/gflags_declare.h> // IWYU pragma: export
|
||||
|
||||
//
|
||||
// NOTE: all functions below MUST have an explicit 'extern' before
|
||||
|
@ -432,11 +432,6 @@ class GFLAGS_DLL_DECL FlagRegisterer {
|
|||
const char* help, const char* filename,
|
||||
void* current_storage, void* defvalue_storage,
|
||||
const fL::OptionalDefineArgs& optional_args);
|
||||
// TODO(csilvers): remove this (and its impl in the .cc file),
|
||||
// once all callers have been updated to the new form:
|
||||
FlagRegisterer(const char* name, const char* type,
|
||||
const char* help, const char* filename,
|
||||
void* current_storage, void* defvalue_storage);
|
||||
};
|
||||
|
||||
// If your application #defines STRIP_FLAG_HELP to a non-zero value
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <gflags/gflags_declare.h> // IWYU pragma: export
|
||||
#include <gflags/gflags_declare.h> // IWYU pragma: export
|
||||
|
||||
//
|
||||
// NOTE: all functions below MUST have an explicit 'extern' before
|
||||
|
@ -436,11 +436,6 @@ class GFLAGS_DLL_DECL FlagRegisterer {
|
|||
const char* help, const char* filename,
|
||||
void* current_storage, void* defvalue_storage,
|
||||
const fL::OptionalDefineArgs& optional_args);
|
||||
// TODO(csilvers): remove this (and its impl in the .cc file),
|
||||
// once all callers have been updated to the new form:
|
||||
FlagRegisterer(const char* name, const char* type,
|
||||
const char* help, const char* filename,
|
||||
void* current_storage, void* defvalue_storage);
|
||||
};
|
||||
|
||||
// If your application #defines STRIP_FLAG_HELP to a non-zero value
|
||||
|
|
Loading…
Add table
Reference in a new issue