[Orxonox-commit 2450] r7157 - in code/branches/presentation3/src/modules: overlays questsystem/notifications

rgrieder at orxonox.net rgrieder at orxonox.net
Wed Jul 21 14:35:23 CEST 2010


Author: rgrieder
Date: 2010-07-21 14:35:23 +0200 (Wed, 21 Jul 2010)
New Revision: 7157

Modified:
   code/branches/presentation3/src/modules/overlays/GUIOverlay.cc
   code/branches/presentation3/src/modules/questsystem/notifications/NotificationQueue.cc
Log:
Using our own conversion functions.

Modified: code/branches/presentation3/src/modules/overlays/GUIOverlay.cc
===================================================================
--- code/branches/presentation3/src/modules/overlays/GUIOverlay.cc	2010-07-21 12:34:21 UTC (rev 7156)
+++ code/branches/presentation3/src/modules/overlays/GUIOverlay.cc	2010-07-21 12:35:23 UTC (rev 7157)
@@ -29,8 +29,8 @@
 #include "GUIOverlay.h"
 
 #include <string>
-#include <sstream>
 
+#include "util/Convert.h"
 #include "core/input/InputManager.h"
 #include "core/CoreIncludes.h"
 #include "core/GUIManager.h"
@@ -72,9 +72,7 @@
 
         if (this->isVisible())
         {
-            std::ostringstream out;
-            out << reinterpret_cast<long>(this);
-            const std::string& str = out.str();
+            const std::string& str = multi_cast<std::string>(reinterpret_cast<long>(this));
             GUIManager::getInstance().showGUIExtra(this->guiName_, str);
 
             COUT(4) << "Showing GUI " << this->guiName_ << std::endl;

Modified: code/branches/presentation3/src/modules/questsystem/notifications/NotificationQueue.cc
===================================================================
--- code/branches/presentation3/src/modules/questsystem/notifications/NotificationQueue.cc	2010-07-21 12:34:21 UTC (rev 7156)
+++ code/branches/presentation3/src/modules/questsystem/notifications/NotificationQueue.cc	2010-07-21 12:35:23 UTC (rev 7157)
@@ -33,8 +33,7 @@
 
 #include "NotificationQueue.h"
 
-#include <sstream>
-
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "NotificationOverlay.h"
@@ -402,9 +401,7 @@
         container->time = time;
         std::string timeString = std::ctime(&time);
         timeString.erase(timeString.length()-1);
-        std::ostringstream stream;
-        stream << reinterpret_cast<unsigned long>(notification);
-        const std::string& addressString = stream.str();
+        const std::string& addressString = multi_cast<std::string>(reinterpret_cast<unsigned long>(notification));
         container->name = "NotificationOverlay(" + timeString + ")&" + addressString;
 
         this->containers_.insert(container);




More information about the Orxonox-commit mailing list