From 0ff0dad483d888d30ab74da34c944fcab826b242 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 23 Jul 2012 22:33:41 +0000 Subject: [PATCH] Removed obsolete HAS_SSTREAM option --- SConstruct | 2 -- configure.ac | 2 -- include/cantera/base/config.h.in | 1 - src/base/xml.cpp | 4 ---- src/converters/ck2ct.cpp | 24 ------------------------ 5 files changed, 33 deletions(-) diff --git a/SConstruct b/SConstruct index 0f013ab3e..3af7445a6 100644 --- a/SConstruct +++ b/SConstruct @@ -680,7 +680,6 @@ if not conf.CheckCXXHeader('cmath', '<>'): print 'ERROR: The C++ compiler is not correctly configured.' sys.exit(0) -env['HAS_SSTREAM'] = conf.CheckCXXHeader('sstream', '<>') env['HAS_TIMES_H'] = conf.CheckCHeader('sys/times.h', '""') env['HAS_UNISTD_H'] = conf.CheckCHeader('unistd.h', '""') env['HAS_MATH_H_ERF'] = conf.CheckDeclaration('erf', '#include ', 'C++') @@ -939,7 +938,6 @@ cdefine('LAPACK_NAMES_LOWERCASE', 'lapack_names', 'lower') configh['RXNPATH_FONT'] = quoted(env['rpfont']) cdefine('THREAD_SAFE_CANTERA', 'build_thread_safe') -cdefine('HAS_SSTREAM', 'HAS_SSTREAM') if not env['HAS_MATH_H_ERF']: if env['HAS_BOOST_MATH']: diff --git a/configure.ac b/configure.ac index e198538c9..9573708da 100644 --- a/configure.ac +++ b/configure.ac @@ -48,8 +48,6 @@ AC_DEFINE([WITH_STOICH_SUBSTANCE],1,[Define to include stoichiometric substances WITH_STOICH_SUBSTANCE=1 AC_DEFINE([WITH_IDEAL_SOLUTIONS],1,[Define to include ideal solutions]) WITH_IDEAL_SOLUTIONS=1 -AC_DEFINE([HAS_SSTREAM],1,[Define to include sstream]) -HAS_SSTREAM=1 AC_DEFINE_UNQUOTED([CANTERA_DATA], ["$prefix/data"], [Default data directory]) diff --git a/include/cantera/base/config.h.in b/include/cantera/base/config.h.in index e5dbd04f5..219c45094 100644 --- a/include/cantera/base/config.h.in +++ b/include/cantera/base/config.h.in @@ -67,7 +67,6 @@ typedef int ftnlen; // Fortran hidden string length type // OS X, This used to add some Mac-specific directories to the default // data file search path. %(DARWIN)s -%(HAS_SSTREAM)s // Identify whether the operating system is cygwin's overlay of // windows, with gcc being used as the compiler. diff --git a/src/base/xml.cpp b/src/base/xml.cpp index ca70aac3d..0a5393359 100644 --- a/src/base/xml.cpp +++ b/src/base/xml.cpp @@ -7,9 +7,7 @@ // Copyright 2001 California Institute of Technology #include "cantera/base/config.h" -#ifdef HAS_SSTREAM #include -#endif #include using namespace std; @@ -110,11 +108,9 @@ public: "\", does not contain a required\n" + " XML child node named \"" + child + "\".\n"; -#ifdef HAS_SSTREAM ostringstream ss(ostringstream::out); p->write(ss,1); m_msg += ss.str() + "\n"; -#endif setError("XML_NoChild", m_msg); } diff --git a/src/converters/ck2ct.cpp b/src/converters/ck2ct.cpp index 3915c5920..22165ae49 100644 --- a/src/converters/ck2ct.cpp +++ b/src/converters/ck2ct.cpp @@ -8,9 +8,7 @@ #include "cantera/base/config.h" -#ifdef HAS_SSTREAM #include -#endif using namespace std; #include "CKReader.h" @@ -52,13 +50,6 @@ static void getTransportData(string trfile) */ string rest; while (! s.eof()) { - /* - * HKM Note: the USE_STRINGSTREAM block works for files - * with comments in them. The other block gets hung up - * somehow. Should probably default to the USE_STRINGSTREAM - * option. - */ -#ifdef HAS_SSTREAM /* * Read a line from the file * @@ -92,21 +83,6 @@ static void getTransportData(string trfile) _trmap[nm] = t; // t.name] = t; } } -#else - trdata t; - string nm; - s >> nm; - if (nm[0] != '!' && !s.eof()) { - s >> t.geom >> t.welldepth >> t.diam - >> t.dipole >> t.polar >> t.rot; - - // get the rest of the line, in case there are comments - getline(s, rest, '\n'); - if (nm != "") { - _trmap[nm] = t; // t.name] = t; - } - } -#endif } }