diff options
Diffstat (limited to 'libs/pbd/uuid.cc')
-rw-r--r-- | libs/pbd/uuid.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libs/pbd/uuid.cc b/libs/pbd/uuid.cc index 0ffeca23cb..8b55ab3381 100644 --- a/libs/pbd/uuid.cc +++ b/libs/pbd/uuid.cc @@ -20,19 +20,16 @@ #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()); } |