Add bbt_add that does not take Metric parameter.
[ardour.git] / libs / pbd / id.cc
index 642243a36aeeee8758dc15ea5822d50615f4585d..25c96c305e624c27afef950b6a3a33624a749bb7 100644 (file)
@@ -26,7 +26,7 @@
 #endif
 #include <inttypes.h>
 
-#include <pbd/id.h>
+#include "pbd/id.h"
 #include <string>
 
 using namespace std;
@@ -38,7 +38,8 @@ uint64_t ID::_counter = 0;
 void
 ID::init ()
 {
-       counter_lock = new Glib::Mutex;
+       if (!counter_lock)
+               counter_lock = new Glib::Mutex;
 }
 
 ID::ID ()
@@ -71,6 +72,12 @@ string ID::to_s() const
     return string(buf);
 }
 
+bool
+ID::operator== (const string& str) const
+{
+       return to_s() == str;
+}
+
 ID&
 ID::operator= (string str)
 {