rework Stateful::set_state() patch to avoid default version argument
[ardour.git] / libs / pbd / stateful.cc
index da014d738f15d2aa8ee8131933a0ec375085014d..58be141a275a846c523b39e3fd5d9c3e61d4a814 100644 (file)
 
 #include <unistd.h>
 
-#include <pbd/stateful.h>
-#include <pbd/filesystem.h>
-#include <pbd/xml++.h>
-#include <pbd/error.h>
+#include "pbd/stateful.h"
+#include "pbd/filesystem.h"
+#include "pbd/xml++.h"
+#include "pbd/error.h"
 
 #include "i18n.h"
 
+using namespace std;
+
 namespace PBD {
 
+int Stateful::current_state_version = 0;
+int Stateful::loading_state_version = 0;
+
 Stateful::Stateful ()
 {
        _extra_xml = 0;
@@ -40,16 +45,14 @@ Stateful::~Stateful ()
        // Do not delete _extra_xml.  The use of add_child_nocopy() 
        // means it needs to live on indefinately.
 
-       if (_instant_xml) {
-               delete _instant_xml;
-       }
+       delete _instant_xml;
 }
 
 void
 Stateful::add_extra_xml (XMLNode& node)
 {
        if (_extra_xml == 0) {
-               _extra_xml = new XMLNode ("extra");
+               _extra_xml = new XMLNode ("Extra");
        }
 
        _extra_xml->remove_nodes (node.name());