From 1cf5b6d11c055daa7ec15c53ddd8dd9267174df9 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 17 Aug 2018 00:33:33 +0900 Subject: [PATCH] Switched from strstream to sstream. Signed-off-by: Michele Calgaro --- ktouch/src/ktouchstatisticsdata.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/ktouch/src/ktouchstatisticsdata.cpp b/ktouch/src/ktouchstatisticsdata.cpp index 295777fd..6bf98716 100644 --- a/ktouch/src/ktouchstatisticsdata.cpp +++ b/ktouch/src/ktouchstatisticsdata.cpp @@ -21,12 +21,7 @@ #include #include #include - -#ifdef HAVE_SSTREAM -# include -#else -# include -#endif +#include // remove this define if XML output should be made uncompressed #define COMPRESSED_XML_STATISTICS @@ -106,11 +101,7 @@ bool KTouchLevelStats::read(TQDomNode in) { if (!n.isNull()) { TQString char_data = n.firstChild().nodeValue(); //kdDebug() << "'" << char_data << "'" << endl; -#ifdef HAVE_SSTREAM std::stringstream strm(std::string(char_data.local8Bit())); -#else - std::istrstream strm(char_data.local8Bit(), char_data.local8Bit().length()); -#endif int ch, correct, wrong; while (strm >> ch >> correct >> wrong) m_charStats.insert( KTouchCharStats(TQChar(ch), correct, wrong) ); @@ -251,11 +242,7 @@ bool KTouchSessionStats::read(TQDomNode in) { n = in.namedItem("LevelNums"); if (!n.isNull()) { TQString str = n.firstChild().nodeValue(); -#ifdef HAVE_SSTREAM std::stringstream strm(std::string(str.local8Bit())); -#else - std::istrstream strm(str.local8Bit(), str.local8Bit().length()); -#endif int l; while (strm >> l) m_levelNums.insert(l); @@ -265,11 +252,7 @@ bool KTouchSessionStats::read(TQDomNode in) { if (!n.isNull()) { TQString char_data = n.firstChild().nodeValue(); //kdDebug() << "'" << char_data << "'" << endl; -#ifdef HAVE_SSTREAM std::stringstream strm(std::string(char_data.local8Bit())); -#else - std::istrstream strm(char_data.local8Bit(), char_data.local8Bit().length()); -#endif int ch, correct, wrong; while (strm >> ch >> correct >> wrong) m_charStats.insert( KTouchCharStats(TQChar(ch), correct, wrong) );