]> git.lyx.org Git - lyx.git/blobdiff - src/support/lyxsum.C
remove commented HAVE_SSTREAM code
[lyx.git] / src / support / lyxsum.C
index 26028bb1030ed83d8edabeac7f483a8de61e4455..e018073f2bea25095d021baeb0b56195d42559f4 100644 (file)
 
 #include <fstream>
 
-#ifdef HAVE_SSTREAM
-#include <sstream>
-using std::ostringstream;
-#else
-#include <strstream>
-#endif
+#include "Lsstream.h"
 
 #include "support/lyxlib.h"
 
@@ -116,21 +111,10 @@ unsigned long lyx::sum(char const * file)
        ifstream ifs(file);
        if (!ifs) return 0;
        ifs.unsetf(ios::skipws);
-#ifdef HAVE_SSTREAM
        ostringstream ostr;
        ostr << ifs.rdbuf();
        // The .c_str() is here in case we use our lyxstring class
        // instead of standard string. 
        string w = ostr.str().c_str();
        return do_crc(w.begin(), w.end());
-#else
-       ostrstream ostr;
-       ostr << ifs.rdbuf();
-       char * tmp = ostr.str();
-       if (!tmp) return 0; // empty file
-       string w(tmp, ostr.tellp());
-       unsigned long crc = do_crc(w.begin(), w.end());
-       delete tmp;
-       return crc;
-#endif
 }