[#19226] (2.5) blender uses deprecated 'strstream' STL class, causes warnings with gcc
authorCampbell Barton <ideasman42@gmail.com>
Sat, 22 Aug 2009 17:19:31 +0000 (17:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 22 Aug 2009 17:19:31 +0000 (17:19 +0000)
thanks to Mauro Toffanin (equilibrium)

This is the only place where strstream were used.

source/gameengine/VideoTexture/Exception.cpp

index 8704d49f2a7eb9079e009fdca927376e8dcac841..35d335b5981b7bec69e344e6d99237ca7a5c9ebe 100644 (file)
@@ -21,7 +21,7 @@ http://www.gnu.org/copyleft/lesser.txt.
 */
 
 
-#include <strstream>
+#include <sstream>
 #include <fstream>
 
 #include <PyObjectPlus.h>
@@ -170,11 +170,11 @@ void Exception::setXptDesc (void)
                // length of result code
                const size_t rsltSize = 11;
                // delimit description
-               const char delimRslt[] = ": ";
+               //const char delimRslt[] = ": ";
                // set text of description
                char rsltTxt[rsltSize];
-               std::ostrstream os(rsltTxt, rsltSize);
-               os << std::hex << m_hRslt << delimRslt << '\0';
+               std::ostringstream os;
+               os << std::hex << m_hRslt << ": " << '\0';
                // copy result to description
                m_desc.insert(0, rsltTxt);
                // copy exception description to last exception string