[icinga-checkins] icinga.org: icinga2/master: Use boost:: lexical_cast instead of stringstreams.

git at icinga.org git at icinga.org
Thu Jan 31 13:58:37 CET 2013


Module: icinga2
Branch: master
Commit: 24e2d1d3f2000464d6b68a9263a77308f1f76b29
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=24e2d1d3f2000464d6b68a9263a77308f1f76b29

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Jan 31 10:10:51 2013 +0100

Use boost::lexical_cast instead of stringstreams.

---

 lib/base/utility.cpp |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp
index ada3fbe..b6cec47 100644
--- a/lib/base/utility.cpp
+++ b/lib/base/utility.cpp
@@ -435,10 +435,6 @@ Utility::LoadIcingaLibrary(const String& library, bool module)
 String Utility::NewUUID(void)
 {
 	boost::uuids::uuid uuid = boost::uuids::random_generator()();
-
-	stringstream us;
-	us << uuid;
-
-	return us.str();
+	return boost::lexical_cast<String>(uuid);
 }
 





More information about the icinga-checkins mailing list