Add missing initializer in Utility::NewUniqueID()

This commit is contained in:
Gunnar Beutner 2017-12-14 18:48:58 +01:00
parent 1bf12c9685
commit a6887b1ae9
1 changed files with 2 additions and 2 deletions

View File

@ -34,6 +34,7 @@
#include <boost/algorithm/string/trim.hpp> #include <boost/algorithm/string/trim.hpp>
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <boost/uuid/uuid_io.hpp> #include <boost/uuid/uuid_io.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <ios> #include <ios>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
@ -441,8 +442,7 @@ void Utility::Sleep(double timeout)
*/ */
String Utility::NewUniqueID(void) String Utility::NewUniqueID(void)
{ {
boost::uuids::uuid u; return boost::lexical_cast<std::string>(boost::uuids::random_generator()());
return boost::lexical_cast<std::string>(u);
} }
#ifdef _WIN32 #ifdef _WIN32