Преглед изворни кода

fix static init ordering problem

David Rose пре 19 година
родитељ
комит
6a9fdd6575

+ 0 - 6
panda/src/pgraph/config_pgraph.cxx

@@ -254,12 +254,6 @@ ConfigVariableList load_file_type
           "either the name of a module, or a space-separate list of filename "
           "either the name of a module, or a space-separate list of filename "
           "extensions, followed by the name of the module."));
           "extensions, followed by the name of the module."));
 
 
-ConfigVariableList cull_bin
-("cull-bin", 
- PRC_DESC("Creates a new cull bin by name, with the specified properties.  "
-          "This is a string in three tokens, separated by whitespace: "
-          "'bin_name sort type'."));
-
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: init_libpgraph
 //     Function: init_libpgraph
 //  Description: Initializes the library.  This must be called at
 //  Description: Initializes the library.  This must be called at

+ 0 - 1
panda/src/pgraph/config_pgraph.h

@@ -62,7 +62,6 @@ extern ConfigVariableBool m_dual_flash;
 extern ConfigVariableBool asynchronous_loads;
 extern ConfigVariableBool asynchronous_loads;
 
 
 extern ConfigVariableList load_file_type;
 extern ConfigVariableList load_file_type;
-extern ConfigVariableList cull_bin;
 
 
 extern EXPCL_PANDA void init_libpgraph();
 extern EXPCL_PANDA void init_libpgraph();
 
 

+ 6 - 0
panda/src/pgraph/cullBinManager.cxx

@@ -262,6 +262,12 @@ do_sort_bins() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CullBinManager::
 void CullBinManager::
 setup_initial_bins() {
 setup_initial_bins() {
+  ConfigVariableList cull_bin
+    ("cull-bin", 
+     PRC_DESC("Creates a new cull bin by name, with the specified properties.  "
+              "This is a string in three tokens, separated by whitespace: "
+              "'bin_name sort type'."));
+  
   // First, add all of the bins specified in the Configrc file.
   // First, add all of the bins specified in the Configrc file.
   int num_bins = cull_bin.get_num_unique_values();
   int num_bins = cull_bin.get_num_unique_values();