summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-08-17 00:33:33 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-08-17 00:37:22 +0900
commit621189a0bc5c647351f102aa000f5b7fa4bb1e92 (patch)
tree4b540c6134ac436b58d32d4a8c444067b60f9a03
parent7de8ea1b8b42d4d32974a277c1d56304bf3b7b82 (diff)
downloadtdeedu-621189a0bc5c647351f102aa000f5b7fa4bb1e92.tar.gz
tdeedu-621189a0bc5c647351f102aa000f5b7fa4bb1e92.zip
Switched from strstream to sstream.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 1cf5b6d11c055daa7ec15c53ddd8dd9267174df9)
-rw-r--r--ktouch/src/ktouchstatisticsdata.cpp19
1 files changed, 1 insertions, 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 <tdelocale.h>
#include <tdetempfile.h>
#include <tdeio/netaccess.h>
-
-#ifdef HAVE_SSTREAM
-# include <sstream>
-#else
-# include <strstream>
-#endif
+#include <sstream>
// 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) );