Merge branch 'master' into windows
[ardour.git] / libs / pbd / uuid.cc
index 0ffeca23cba4418973a737c04ae1b4791aa58b91..8b55ab338169b3b263d0bbefaf76e03e221ea47a 100644 (file)
 
 #include "pbd/uuid.h"
 
-using namespace PBD;
-
-UUID&
-UUID::operator= (std::string const & str)
+PBD::UUID&
+PBD::UUID::operator= (std::string const & str)
 {
-       uuid_parse (str.c_str(), id);
+        boost::uuids::string_generator gen;
+        *((boost::uuids::uuid*) this) = gen (str);
        return *this;
 }
 
 std::string
-UUID::to_s () const
+PBD::UUID::to_s () const
 {
-       char buf[37];
-       uuid_unparse (id, buf);
-       return std::string (buf);
+        return std::string ((const char*) data, size());
 }