From fc816aefb64017cfc2e9fb93f97c589136b5f65e Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Mon, 28 Mar 2011 21:00:26 +0000 Subject: [PATCH] Fixed namespace issues. --- Cantera/cxx/demos/kinetics1/example_utils.h | 19 ++++++++----------- Cantera/cxx/demos/kinetics1/kinetics1.cpp | 4 ++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Cantera/cxx/demos/kinetics1/example_utils.h b/Cantera/cxx/demos/kinetics1/example_utils.h index 59e62ef7d..a4697ae38 100644 --- a/Cantera/cxx/demos/kinetics1/example_utils.h +++ b/Cantera/cxx/demos/kinetics1/example_utils.h @@ -5,11 +5,8 @@ #include namespace Cantera{} -using namespace Cantera; namespace std{} -using namespace std; namespace CanteraZeroD{} -using namespace CanteraZeroD; // Save the temperature, density, pressure, and mole fractions at one // time @@ -48,18 +45,18 @@ void makeDataLabels(const G& gas, V& names) { } template -void plotSoln(string fname, string fmt, string title, const G& gas, const A& soln) { - vector names; +void plotSoln(std::string fname, std::string fmt, std::string title, const G& gas, const A& soln) { + std::vector names; makeDataLabels(gas, names); writePlotFile(fname, fmt, title, names, soln); } -inline void writeCanteraHeader(ostream& s) { - s << endl; - s << " Cantera version " << "CANTERA_VERSION" << endl; - s << " Copyright California Institute of Technology, 2002." << endl; - s << " http://www.cantera.org" << endl; - s << endl; +inline void writeCanteraHeader(std::ostream& s) { + s << std::endl; + s << " Cantera version " << "CANTERA_VERSION" << std::endl; + s << " Copyright California Institute of Technology, 2002." << std::endl; + s << " http://www.cantera.org" << std::endl; + s << std::endl; } #endif diff --git a/Cantera/cxx/demos/kinetics1/kinetics1.cpp b/Cantera/cxx/demos/kinetics1/kinetics1.cpp index b8e440838..08ad2e152 100644 --- a/Cantera/cxx/demos/kinetics1/kinetics1.cpp +++ b/Cantera/cxx/demos/kinetics1/kinetics1.cpp @@ -24,6 +24,10 @@ #include #include "example_utils.h" +using namespace std; +using namespace Cantera; +using namespace CanteraZeroD; +using namespace Cantera_CXX; int kinetics1(int np, void* p) {