summaryrefslogtreecommitdiffstats
path: root/ktouch
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:33:33 +0900
commit1cf5b6d11c055daa7ec15c53ddd8dd9267174df9 (patch)
treefea7e280d530658dbf00bb25d560ed47155df567 /ktouch
parent85dd54d9c52545e1995a1f5359f2725eb263d009 (diff)
downloadtdeedu-1cf5b6d11c055daa7ec15c53ddd8dd9267174df9.tar.gz
tdeedu-1cf5b6d11c055daa7ec15c53ddd8dd9267174df9.zip
Switched from strstream to sstream.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'ktouch')
-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) );