From 089429fee9142fce0890801235fd2f5d1fc3275d Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 10 Oct 2002 08:11:05 -0400 Subject: Try to use platform independent input string stream --- Source/cmStandardIncludes.h | 19 +++++++++++++++++++ Source/ctest.cxx | 4 +--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index b0d391f..22bb4bf 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -173,6 +173,15 @@ private: cmStringStream(const cmStringStream&); void operator=(const cmStringStream&); }; +class cmInputStringStream: public std::istringstream +{ +public: + cmInputStringStream() {} + cmInputStringStream(const char* c) : std::istringstream(c) {} +private: + cmInputStringStream(const cmInputStringStream&); + void operator=(const cmInputStringStream&); +}; #else class cmStrStreamCleanup { @@ -201,6 +210,16 @@ private: cmStringStream(const cmStringStream&); void operator=(const cmStringStream&); }; +class cmInputStringStream: public std::istrstream +{ +public: + typedef std::istrstream Superclass; + cmInputStringStream(const char* c) : Superclass(c) {} +private: + cmInputStringStream(const cmInputStringStream&); + void operator=(const cmInputStringStream&); +}; #endif + #endif diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 2e2626a..dfc18a1 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -18,8 +18,6 @@ #include "cmRegularExpression.h" #include "cmSystemTools.h" -#include - #include #include @@ -477,7 +475,7 @@ int ctest::BuildDirectory() // 1 - error // > 1 - warning std::vector markedLines; - std::istrstream istr(coutput); + cmInputStringStream istr(coutput); while(istr) { char buffer[1024]; -- cgit v0.12