Move curve test file handling in main() until after ARDOUR::init is called
authorTim Mayberry <mojofunk@gmail.com>
Sat, 10 Aug 2013 02:08:45 +0000 (12:08 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Tue, 13 Aug 2013 10:15:47 +0000 (20:15 +1000)
This means it doesn't need to call PBD::ID::init directly, which it now
shouldn't be doing

gtk2_ardour/curvetest.cc
gtk2_ardour/main.cc

index b3431e3f395ad128b09f973f2b4b63d0024f7b99..818a010f1d0e931c2c1acf4348ca4927e3410a18 100644 (file)
@@ -32,11 +32,6 @@ using namespace PBD;
 int
 curvetest (string filename)
 {
-       // needed to initialize ID objects/counter used
-       // by Curve et al.
-
-       PBD::ID::init ();
-
        ifstream in (filename.c_str());
        stringstream line;
        //Evoral::Parameter param(GainAutomation, -1.0, +1.0, 0.0);
index 84cd696af1522107c3a1bb32c603b340b79dac5d..e619c9d83bcf40caf34d52c02bc89b9ae1da0544 100644 (file)
@@ -482,10 +482,6 @@ int main (int argc, char *argv[])
                exit (1);
        }
 
-       if (curvetest_file) {
-               return curvetest (curvetest_file);
-       }
-
        cout << PROGRAM_NAME
             << VERSIONSTRING
             << _(" (built using ")
@@ -518,6 +514,10 @@ int main (int argc, char *argv[])
                exit (1);
        }
 
+       if (curvetest_file) {
+               return curvetest (curvetest_file);
+       }
+
        if (::signal (SIGPIPE, sigpipe_handler)) {
                cerr << _("Cannot xinstall SIGPIPE error handler") << endl;
        }