summaryrefslogtreecommitdiff
path: root/zen/guid.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2017-02-13 21:25:04 -0700
committerDaniel Wilhelm <shieldwed@outlook.com>2017-02-13 21:25:04 -0700
commit9d071d2a2cec9a7662a02669488569a017f0ea35 (patch)
treec83a623fbdff098339b66d21ea2e81f3f67344ae /zen/guid.h
parent8.8 (diff)
downloadFreeFileSync-9d071d2a2cec9a7662a02669488569a017f0ea35.tar.gz
FreeFileSync-9d071d2a2cec9a7662a02669488569a017f0ea35.tar.bz2
FreeFileSync-9d071d2a2cec9a7662a02669488569a017f0ea35.zip
8.9
Diffstat (limited to 'zen/guid.h')
-rwxr-xr-x[-rw-r--r--]zen/guid.h64
1 files changed, 30 insertions, 34 deletions
diff --git a/zen/guid.h b/zen/guid.h
index 63007707..052f3fdc 100644..100755
--- a/zen/guid.h
+++ b/zen/guid.h
@@ -1,34 +1,30 @@
-// *****************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 *
-// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved *
-// *****************************************************************************
-
-#ifndef GUID_H_80425780237502345
-#define GUID_H_80425780237502345
-
-#include <string>
-
-#ifdef __GNUC__ //boost should clean this mess up
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-#include <boost/uuid/uuid_generators.hpp>
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif
-
-
-namespace zen
-{
-inline
-std::string generateGUID() //creates a 16-byte GUID
-{
- boost::uuids::uuid nativeRep = boost::uuids::random_generator()();
- //generator is only thread-safe like an int, so we keep it local until we need to optimize perf
- //perf: generator: 0.22ms per call; retrieve GUID: 0.12µs per call
- return std::string(nativeRep.begin(), nativeRep.end());
-}
-}
-
-#endif //GUID_H_80425780237502345
+// *****************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 *
+// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved *
+// *****************************************************************************
+
+#ifndef GUID_H_80425780237502345
+#define GUID_H_80425780237502345
+
+#include <string>
+
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#include <boost/uuid/uuid_generators.hpp>
+ #pragma GCC diagnostic pop
+
+
+namespace zen
+{
+inline
+std::string generateGUID() //creates a 16-byte GUID
+{
+ boost::uuids::uuid nativeRep = boost::uuids::random_generator()();
+ //generator is only thread-safe like an int, so we keep it local until we need to optimize perf
+ //perf: generator: 0.22ms per call; retrieve GUID: 0.12µs per call
+ return std::string(nativeRep.begin(), nativeRep.end());
+}
+}
+
+#endif //GUID_H_80425780237502345
bgstack15