Add bbt_add that does not take Metric parameter.
[ardour.git] / libs / pbd / id.cc
index d24d22a0f9fe6695a1f392f97104ed0bab5265d8..25c96c305e624c27afef950b6a3a33624a749bb7 100644 (file)
@@ -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)
 {