Mercurial > hg > orthanc-webviewer
diff Orthanc/Core/Toolbox.cpp @ 155:08f30c8962a7
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Nov 2016 13:28:58 +0100 |
parents | 1a90184363f8 |
children | 5dc54316d68b |
line wrap: on
line diff
--- a/Orthanc/Core/Toolbox.cpp Wed Nov 16 21:08:01 2016 +0100 +++ b/Orthanc/Core/Toolbox.cpp Tue Nov 29 13:28:58 2016 +0100 @@ -77,18 +77,9 @@ #endif - -// Inclusions for UUID -// http://stackoverflow.com/a/1626302 - -extern "C" -{ -#ifdef WIN32 -# include <rpc.h> -#else -# include <uuid/uuid.h> +#if defined(_WIN32) +# include <windows.h> // For ::Sleep #endif -} #if ORTHANC_ENABLE_PUGIXML == 1 @@ -1226,28 +1217,6 @@ } - std::string Toolbox::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; - } - - bool Toolbox::IsUuid(const std::string& str) { if (str.size() != 36)