Removed some unnecessary "using namespace" directives

This commit is contained in:
Ray Speth 2012-10-24 15:45:19 +00:00
parent 3df93b8f4c
commit 3cd3bbef8f
9 changed files with 9 additions and 37 deletions

View file

@ -8,7 +8,6 @@
#include <string> #include <string>
#include <algorithm> #include <algorithm>
using namespace std;
using namespace Cantera; using namespace Cantera;
// The program is put into a function so that error handling code can // The program is put into a function so that error handling code can

View file

@ -6,17 +6,12 @@
#include "cantera/PureFluid.h" // defines class Water #include "cantera/PureFluid.h" // defines class Water
using namespace Cantera; using namespace Cantera;
using namespace std;
map<string,double> h; std::map<std::string,double> h, s, T, P, x;
map<string,double> s; std::vector<std::string> states;
map<string,double> T;
map<string,double> P;
map<string,double> x;
vector<string> states;
template<class F> template<class F>
void saveState(F& fluid, string name) void saveState(F& fluid, std::string name)
{ {
h[name] = fluid.enthalpy_mass(); h[name] = fluid.enthalpy_mass();
s[name] = fluid.entropy_mass(); s[name] = fluid.entropy_mass();
@ -28,7 +23,7 @@ void saveState(F& fluid, string name)
void printStates() void printStates()
{ {
string name; std::string name;
int n; int n;
int nStates = states.size(); int nStates = states.size();
for (n = 0; n < nStates; n++) { for (n = 0; n < nStates; n++) {
@ -75,7 +70,7 @@ int openRankine(int np, void* p)
double heat_in = h["3"] - h["2"]; double heat_in = h["3"] - h["2"];
double efficiency = work/heat_in; double efficiency = work/heat_in;
cout << "efficiency = " << efficiency << endl; std::cout << "efficiency = " << efficiency << std::endl;
return 0; return 0;
} }
@ -92,4 +87,3 @@ int main()
} }
} }
#endif #endif

View file

@ -891,4 +891,3 @@ size_t Cantera::ElemRearrange(size_t nComponents, const vector_fp& elementAbunda
} while (jr < (nComponents-1)); } while (jr < (nComponents-1));
return nComponents; return nComponents;
} /* vcs_elem_rearrange() ****************************************************/ } /* vcs_elem_rearrange() ****************************************************/

View file

@ -8,9 +8,6 @@ using boost::math::erf;
#include "cantera/spectra/LineBroadener.h" #include "cantera/spectra/LineBroadener.h"
using namespace std;
using namespace Cantera;
namespace Cantera namespace Cantera
{ {
@ -94,11 +91,11 @@ Voigt::Voigt(doublereal sigma, doublereal gamma)
void Voigt::testv() void Voigt::testv()
{ {
m_gamma = 1.0e1; m_gamma = 1.0e1;
cout << F(1.0) << endl; std::cout << F(1.0) << std::endl;
m_gamma = 0.5; m_gamma = 0.5;
cout << F(1.0) << endl; std::cout << F(1.0) << std::endl;
m_gamma = 0.0001; m_gamma = 0.0001;
cout << F(10.0) << endl; std::cout << F(10.0) << std::endl;
} }
/** /**
* This method evaluates the function * This method evaluates the function

View file

@ -5,9 +5,6 @@
#include "cantera/base/ct_defs.h" #include "cantera/base/ct_defs.h"
#include "cantera/spectra/rotor.h" #include "cantera/spectra/rotor.h"
using namespace std;
using namespace Cantera;
namespace Cantera namespace Cantera
{ {
@ -110,7 +107,3 @@ doublereal Rotor::intensity(int J_lower, int J_upper, doublereal T)
} }
} }

View file

@ -19,8 +19,6 @@
#include "cantera/thermo/ThermoFactory.h" #include "cantera/thermo/ThermoFactory.h"
#include <string> #include <string>
using namespace std;
using namespace Cantera;
namespace Cantera namespace Cantera
{ {

View file

@ -3,9 +3,6 @@
#include "cantera/zeroD/ReactorBase.h" #include "cantera/zeroD/ReactorBase.h"
#include "cantera/numerics/Func1.h" #include "cantera/numerics/Func1.h"
using namespace std;
using namespace Cantera;
namespace Cantera namespace Cantera
{ {
@ -28,7 +25,7 @@ bool FlowDevice::install(ReactorBase& in, ReactorBase& out)
m_nspin = mixin->nSpecies(); m_nspin = mixin->nSpecies();
m_nspout = mixout->nSpecies(); m_nspout = mixout->nSpecies();
string nm; std::string nm;
size_t ki, ko; size_t ki, ko;
for (ki = 0; ki < m_nspin; ki++) { for (ki = 0; ki < m_nspin; ki++) {
nm = mixin->speciesName(ki); nm = mixin->speciesName(ki);

View file

@ -6,7 +6,6 @@
#include <cstdio> #include <cstdio>
using namespace std; using namespace std;
using namespace Cantera;
namespace Cantera namespace Cantera
{ {

View file

@ -1,13 +1,9 @@
#include "cantera/zeroD/Wall.h" #include "cantera/zeroD/Wall.h"
#include "cantera/zeroD/ReactorBase.h" #include "cantera/zeroD/ReactorBase.h"
#include "cantera/numerics/Func1.h" #include "cantera/numerics/Func1.h"
#include "cantera/kinetics/InterfaceKinetics.h" #include "cantera/kinetics/InterfaceKinetics.h"
#include "cantera/thermo/SurfPhase.h" #include "cantera/thermo/SurfPhase.h"
using namespace std;
using namespace Cantera;
namespace Cantera namespace Cantera
{ {