diff Core/SystemToolbox.cpp @ 2512:4dcafa8d6633

SystemToolbox::GenerateUuid moved to Toolbox::GenerateUuid
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Mar 2018 15:20:50 +0200
parents 2717a8872396
children f790999a250a
line wrap: on
line diff
--- a/Core/SystemToolbox.cpp	Wed Mar 28 14:18:02 2018 +0200
+++ b/Core/SystemToolbox.cpp	Wed Mar 28 15:20:50 2018 +0200
@@ -62,19 +62,6 @@
 #endif
 
 
-// Inclusions for UUID
-// http://stackoverflow.com/a/1626302
-
-extern "C"
-{
-#if defined(_WIN32)
-#  include <rpc.h>
-#else
-#  include <uuid/uuid.h>
-#endif
-}
-
-
 #include "Logging.h"
 #include "OrthancException.h"
 #include "Toolbox.h"
@@ -539,28 +526,6 @@
   }
 
 
-  std::string SystemToolbox::GenerateUuid()
-  {
-#ifdef WIN32
-    UUID uuid;
-    UuidCreate ( &uuid );
-
-    unsigned char * str;
-    UuidToStringA ( &uuid, &str );
-
-    std::string s( ( char* ) str );
-
-    RpcStringFreeA ( &str );
-#else
-    uuid_t uuid;
-    uuid_generate_random ( uuid );
-    char s[37];
-    uuid_unparse ( uuid, s );
-#endif
-    return s;
-  }
-
-
   static boost::posix_time::ptime GetNow(bool utc)
   {
     if (utc)