diff --git a/samples/cxx/NASA_coeffs/NASA_coeffs.cpp b/samples/cxx/NASA_coeffs/NASA_coeffs.cpp index 976d44d15..ccffc88e7 100644 --- a/samples/cxx/NASA_coeffs/NASA_coeffs.cpp +++ b/samples/cxx/NASA_coeffs/NASA_coeffs.cpp @@ -8,7 +8,6 @@ #include #include -using namespace std; using namespace Cantera; // The program is put into a function so that error handling code can diff --git a/samples/cxx/rankine/rankine.cpp b/samples/cxx/rankine/rankine.cpp index dbe455b08..04cfd9ef6 100644 --- a/samples/cxx/rankine/rankine.cpp +++ b/samples/cxx/rankine/rankine.cpp @@ -6,17 +6,12 @@ #include "cantera/PureFluid.h" // defines class Water using namespace Cantera; -using namespace std; -map h; -map s; -map T; -map P; -map x; -vector states; +std::map h, s, T, P, x; +std::vector states; template -void saveState(F& fluid, string name) +void saveState(F& fluid, std::string name) { h[name] = fluid.enthalpy_mass(); s[name] = fluid.entropy_mass(); @@ -28,7 +23,7 @@ void saveState(F& fluid, string name) void printStates() { - string name; + std::string name; int n; int nStates = states.size(); for (n = 0; n < nStates; n++) { @@ -75,7 +70,7 @@ int openRankine(int np, void* p) double heat_in = h["3"] - h["2"]; double efficiency = work/heat_in; - cout << "efficiency = " << efficiency << endl; + std::cout << "efficiency = " << efficiency << std::endl; return 0; } @@ -92,4 +87,3 @@ int main() } } #endif - diff --git a/src/equil/BasisOptimize.cpp b/src/equil/BasisOptimize.cpp index 5c1662133..da7c40b80 100644 --- a/src/equil/BasisOptimize.cpp +++ b/src/equil/BasisOptimize.cpp @@ -891,4 +891,3 @@ size_t Cantera::ElemRearrange(size_t nComponents, const vector_fp& elementAbunda } while (jr < (nComponents-1)); return nComponents; } /* vcs_elem_rearrange() ****************************************************/ - diff --git a/src/spectra/LineBroadener.cpp b/src/spectra/LineBroadener.cpp index 1dcdb2259..a852b9e23 100644 --- a/src/spectra/LineBroadener.cpp +++ b/src/spectra/LineBroadener.cpp @@ -8,9 +8,6 @@ using boost::math::erf; #include "cantera/spectra/LineBroadener.h" -using namespace std; -using namespace Cantera; - namespace Cantera { @@ -94,11 +91,11 @@ Voigt::Voigt(doublereal sigma, doublereal gamma) void Voigt::testv() { m_gamma = 1.0e1; - cout << F(1.0) << endl; + std::cout << F(1.0) << std::endl; m_gamma = 0.5; - cout << F(1.0) << endl; + std::cout << F(1.0) << std::endl; m_gamma = 0.0001; - cout << F(10.0) << endl; + std::cout << F(10.0) << std::endl; } /** * This method evaluates the function diff --git a/src/spectra/rotor.cpp b/src/spectra/rotor.cpp index 089b4038a..486d1862c 100644 --- a/src/spectra/rotor.cpp +++ b/src/spectra/rotor.cpp @@ -5,9 +5,6 @@ #include "cantera/base/ct_defs.h" #include "cantera/spectra/rotor.h" -using namespace std; -using namespace Cantera; - namespace Cantera { @@ -110,7 +107,3 @@ doublereal Rotor::intensity(int J_lower, int J_upper, doublereal T) } } - - - - diff --git a/src/thermo/MetalSHEelectrons.cpp b/src/thermo/MetalSHEelectrons.cpp index cce3ace42..6ef65962f 100644 --- a/src/thermo/MetalSHEelectrons.cpp +++ b/src/thermo/MetalSHEelectrons.cpp @@ -19,8 +19,6 @@ #include "cantera/thermo/ThermoFactory.h" #include -using namespace std; -using namespace Cantera; namespace Cantera { diff --git a/src/zeroD/FlowDevice.cpp b/src/zeroD/FlowDevice.cpp index 74db950ca..bea7395cd 100644 --- a/src/zeroD/FlowDevice.cpp +++ b/src/zeroD/FlowDevice.cpp @@ -3,9 +3,6 @@ #include "cantera/zeroD/ReactorBase.h" #include "cantera/numerics/Func1.h" -using namespace std; -using namespace Cantera; - namespace Cantera { @@ -28,7 +25,7 @@ bool FlowDevice::install(ReactorBase& in, ReactorBase& out) m_nspin = mixin->nSpecies(); m_nspout = mixout->nSpecies(); - string nm; + std::string nm; size_t ki, ko; for (ki = 0; ki < m_nspin; ki++) { nm = mixin->speciesName(ki); diff --git a/src/zeroD/ReactorNet.cpp b/src/zeroD/ReactorNet.cpp index a9053c907..e0f1183df 100644 --- a/src/zeroD/ReactorNet.cpp +++ b/src/zeroD/ReactorNet.cpp @@ -6,7 +6,6 @@ #include using namespace std; -using namespace Cantera; namespace Cantera { diff --git a/src/zeroD/Wall.cpp b/src/zeroD/Wall.cpp index 4dc0b2d66..c394abff7 100644 --- a/src/zeroD/Wall.cpp +++ b/src/zeroD/Wall.cpp @@ -1,13 +1,9 @@ - #include "cantera/zeroD/Wall.h" #include "cantera/zeroD/ReactorBase.h" #include "cantera/numerics/Func1.h" #include "cantera/kinetics/InterfaceKinetics.h" #include "cantera/thermo/SurfPhase.h" -using namespace std; -using namespace Cantera; - namespace Cantera {