Get rid of the old FlagRegisterer constructor.
authorCraig Silverstein <csilvers+gflags@google.com>
Thu, 3 Nov 2011 23:28:30 +0000 (23:28 +0000)
committerCraig Silverstein <csilvers+gflags@google.com>
Thu, 3 Nov 2011 23:28:30 +0000 (23:28 +0000)
R=jkline,georgevdd
DELTA=27  (0 added, 27 deleted, 0 changed)

Revision created by MOE tool push_codebase.
MOE_MIGRATION=3609

git-svn-id: https://gflags.googlecode.com/svn/trunk@69 6586e3c6-dcc4-952a-343f-ff74eb82781d

src/gflags.cc
src/gflags/gflags.h.in
src/windows/gflags/gflags.h

index 9f7df7e1864dd2868f9d6d634377e8a565163c7c..9c81c7a6853eed7deab246ebbc6c4013de35324b 100644 (file)
@@ -1415,25 +1415,6 @@ FlagRegisterer::FlagRegisterer(const char* name, const char* type,
   FlagRegistry::GlobalRegistry()->RegisterFlag(flag);   // default registry
 }
 
-// TODO(csilvers): remove
-FlagRegisterer::FlagRegisterer(const char* name, const char* type,
-                               const char* help, const char* filename,
-                               void* current_storage, void* defvalue_storage,
-                               const fL::OptionalDefineArgs& optional_args) {
-  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,
-                                              current, defvalue);
-  FlagRegistry::GlobalRegistry()->RegisterFlag(flag);   // default registry
-}
-
 // --------------------------------------------------------------------
 // GetAllFlags()
 //    The main way the FlagRegistry class exposes its data.  This
index e2411daf96a80301d8ee519a0bfb269aa84c00b1..fcd1b2c9a8d9be4c3c9d82bb25a508ccfc3613ad 100644 (file)
@@ -83,8 +83,6 @@
 #include <gflags/gflags_declare.h>    // IWYU pragma: export
 @ac_google_start_namespace@
 
-namespace fL { struct OptionalDefineArgs { }; }  // TODO(csilvers): remove
-
 //
 // NOTE: all functions below MUST have an explicit 'extern' before
 // them.  Our automated opensourcing tools use this as a signal to do
@@ -431,11 +429,6 @@ class GFLAGS_DLL_DECL FlagRegisterer {
   FlagRegisterer(const char* name, const char* type,
                  const char* help, const char* filename,
                  void* current_storage, void* defvalue_storage);
-  // TODO(csilvers): remove this once
-  FlagRegisterer(const char* name, const char* type,
-                 const char* help, const char* filename,
-                 void* current_storage, void* defvalue_storage,
-                 const fL::OptionalDefineArgs& optional_args);
 };
 
 // If your application #defines STRIP_FLAG_HELP to a non-zero value
index e240d1aea9ef6377a6022e0ab8dd92c7ccd2efa0..db12055d6ccdb947b53e0b21870f9d199eabe36a 100644 (file)
@@ -83,8 +83,6 @@
 #include <gflags/gflags_declare.h>    // IWYU pragma: export
 namespace google {
 
-namespace fL { struct OptionalDefineArgs { }; }  // TODO(csilvers): remove
-
 //
 // NOTE: all functions below MUST have an explicit 'extern' before
 // them.  Our automated opensourcing tools use this as a signal to do
@@ -435,11 +433,6 @@ class GFLAGS_DLL_DECL FlagRegisterer {
   FlagRegisterer(const char* name, const char* type,
                  const char* help, const char* filename,
                  void* current_storage, void* defvalue_storage);
-  // TODO(csilvers): remove this once
-  FlagRegisterer(const char* name, const char* type,
-                 const char* help, const char* filename,
-                 void* current_storage, void* defvalue_storage,
-                 const fL::OptionalDefineArgs& optional_args);
 };
 
 // If your application #defines STRIP_FLAG_HELP to a non-zero value