Took out all using namespace calls from headers.
This commit is contained in:
parent
5d5138c677
commit
2abd551d71
23 changed files with 24 additions and 38 deletions
|
|
@ -48,8 +48,6 @@
|
|||
#endif
|
||||
|
||||
namespace Cantera {}
|
||||
//using namespace Cantera;
|
||||
namespace std {}
|
||||
//using namespace std;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
namespace Cantera_CXX{ }
|
||||
|
||||
using namespace Cantera_CXX;
|
||||
|
||||
#include "kernel/ct_defs.h"
|
||||
|
||||
// some useful functions
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include "kernel/EdgeKinetics.h"
|
||||
#include "kernel/importKinetics.h"
|
||||
|
||||
using namespace Cantera;
|
||||
namespace Cantera_CXX {
|
||||
|
||||
class Edge :
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "kernel/importKinetics.h"
|
||||
#include "kernel/stringUtils.h"
|
||||
|
||||
|
||||
namespace Cantera_CXX {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include "kernel/FlowReactor.h"
|
||||
#include "kernel/ConstPressureReactor.h"
|
||||
|
||||
using namespace CanteraZeroD;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
|
||||
#include "flib_defs.h"
|
||||
|
||||
using namespace Cantera;
|
||||
using namespace std;
|
||||
|
||||
// Assert that there is storage
|
||||
// for the templated classes' static member
|
||||
// (needed to compile on solaris)
|
||||
|
|
@ -39,7 +42,7 @@ inline XML_Node* _xml(const integer* n) {
|
|||
return Cabinet<XML_Node>::cabinet()->item(*n);
|
||||
}
|
||||
|
||||
inline ThermoPhase* _fph(const integer* n) {
|
||||
inline Cantera::ThermoPhase* _fph(const integer* n) {
|
||||
return th(*n);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
using namespace ctml;
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
#include "../../clib/src/Cabinet.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
typedef integer status_t;
|
||||
|
||||
namespace Cantera {}
|
||||
using namespace Cantera;
|
||||
namespace std{}
|
||||
using namespace std;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ const double Undef = -999.123;
|
|||
//const double DERR = -999.999;
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
void reportError();
|
||||
|
||||
|
|
@ -24,13 +23,13 @@ inline char* getString(const mxArray* p) {
|
|||
int m = mxGetM(p);
|
||||
int n = mxGetN(p);
|
||||
int buflen = m*n + 1;
|
||||
string msg;
|
||||
std::string msg;
|
||||
|
||||
if (m == 1) {
|
||||
input_buf = (char*)mxCalloc(buflen, sizeof(char));
|
||||
status = mxGetString(p, input_buf, buflen);
|
||||
if(status != 0) {
|
||||
msg = string(input_buf)
|
||||
msg = std::string(input_buf)
|
||||
+ "\nNot enough space. String is truncated.";
|
||||
mexWarnMsgTxt(msg.c_str());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include "cantera/kernel/logger.h"
|
||||
|
||||
#include <iostream>
|
||||
//using namespace std;
|
||||
|
||||
static std::string ss = "disp(' ";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <string>
|
||||
#include "cantera/kernel/logger.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static std::string ss = "print \"\"\" ";
|
||||
|
||||
|
|
@ -18,7 +17,7 @@ namespace Cantera {
|
|||
Py_Logger() {}
|
||||
virtual ~Py_Logger() {}
|
||||
|
||||
virtual void write(const string& s) {
|
||||
virtual void write(const std::string& s) {
|
||||
char ch = s[0];
|
||||
int n = 0;
|
||||
while (ch != '\0') {
|
||||
|
|
@ -35,7 +34,7 @@ namespace Cantera {
|
|||
}
|
||||
|
||||
virtual void error(const std::string& msg) {
|
||||
string err = "raise \""+msg+"\"";
|
||||
std::string err = "raise \""+msg+"\"";
|
||||
PyRun_SimpleString((char *)err.c_str());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -249,8 +249,6 @@ namespace VCSnonideal {
|
|||
|
||||
#include "Cantera.h"
|
||||
#include "kernel/vcs_internal.h"
|
||||
using namespace Cantera;
|
||||
using namespace VCSnonideal;
|
||||
|
||||
const double g_cgs = 980.;
|
||||
const double mass_cyl = 0.066;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
#include "ct_defs.h"
|
||||
|
||||
//using namespace std;
|
||||
namespace Cantera {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
|
|
|
|||
|
|
@ -262,8 +262,8 @@ namespace Cantera {
|
|||
restore(const XML_Node& dom, doublereal* soln) {
|
||||
//map<string, double> x;
|
||||
//getFloats(dom, x);
|
||||
soln[0] = getFloat(dom, "mdot", "massflowrate"); // x["mdot"];
|
||||
soln[1] = getFloat(dom, "temperature", "temperature"); // x["temperature"];
|
||||
soln[0] = ctml::getFloat(dom, "mdot", "massflowrate"); // x["mdot"];
|
||||
soln[1] = ctml::getFloat(dom, "temperature", "temperature"); // x["temperature"];
|
||||
resize(2,1);
|
||||
}
|
||||
|
||||
|
|
@ -726,7 +726,7 @@ namespace Cantera {
|
|||
void Surf1D::
|
||||
restore(const XML_Node& dom, doublereal* soln) {
|
||||
map<string, double> x;
|
||||
getFloats(dom, x);
|
||||
ctml::getFloats(dom, x);
|
||||
soln[0] = x["temperature"];
|
||||
resize(1,1);
|
||||
}
|
||||
|
|
@ -886,7 +886,7 @@ namespace Cantera {
|
|||
void ReactingSurf1D::
|
||||
restore(const XML_Node& dom, doublereal* soln) {
|
||||
map<string, double> x;
|
||||
getFloats(dom, x);
|
||||
ctml::getFloats(dom, x);
|
||||
soln[0] = x["temperature"];
|
||||
resize(1,1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
#include "LTPspecies.h"
|
||||
using namespace std;
|
||||
using namespace ctml;
|
||||
|
||||
namespace Cantera {
|
||||
//====================================================================================================================
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include "MargulesVPSSTP.h"
|
||||
#include <stdlib.h>
|
||||
using namespace std;
|
||||
|
||||
using namespace ctml;
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
|
|
|
|||
|
|
@ -210,8 +210,8 @@ namespace Cantera {
|
|||
* <compositionDependence model="Mixture_Averaged"/>
|
||||
*/
|
||||
std::string modelName = "";
|
||||
if (getOptionalModel(transportNode, "compositionDependence",
|
||||
modelName)) {
|
||||
if (ctml::getOptionalModel(transportNode, "compositionDependence",
|
||||
modelName)) {
|
||||
modelName = lowercase(modelName);
|
||||
if (modelName == "solvent_only") {
|
||||
compositionDepType_ = 0;
|
||||
|
|
|
|||
|
|
@ -867,15 +867,15 @@ namespace Cantera {
|
|||
// child are skipped, instead of throwing an exception.
|
||||
try {
|
||||
XML_Node& tr = sp.child("transport");
|
||||
getString(tr, "geometry", val, type);
|
||||
ctml::getString(tr, "geometry", val, type);
|
||||
geom = gindx[val] - 100;
|
||||
map<std::string, doublereal> fv;
|
||||
|
||||
welldepth = getFloat(tr, "LJ_welldepth");
|
||||
diam = getFloat(tr, "LJ_diameter");
|
||||
dipole = getFloat(tr, "dipoleMoment");
|
||||
polar = getFloat(tr, "polarizability");
|
||||
rot = getFloat(tr, "rotRelax");
|
||||
welldepth = ctml::getFloat(tr, "LJ_welldepth");
|
||||
diam = ctml::getFloat(tr, "LJ_diameter");
|
||||
dipole = ctml::getFloat(tr, "dipoleMoment");
|
||||
polar = ctml::getFloat(tr, "polarizability");
|
||||
rot = ctml::getFloat(tr, "rotRelax");
|
||||
|
||||
GasTransportData data;
|
||||
data.speciesName = name;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
#include <cantera/Cantera.h>
|
||||
#include <cantera/onedim.h>
|
||||
using namespace Cantera;
|
||||
using namespace std;
|
||||
|
||||
/// Namespace for the boundary value problem package.
|
||||
namespace BVP {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <cantera/kernel/Array.h>
|
||||
#include <cantera/kernel/plots.h>
|
||||
|
||||
using namespace Cantera;
|
||||
namespace CanteraZeroD{}
|
||||
|
||||
// Save the temperature, density, pressure, and mole fractions at one
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ gmres( int m, int N, const Matrix &A, const doublereal *b, doublereal *x, double
|
|||
|
||||
#include "cblas.h"
|
||||
#include "../../Cantera/src/ctlapack.h"
|
||||
using namespace Cantera;
|
||||
|
||||
template< class Matrix >
|
||||
inline int
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ gmres( int m, int N, const Matrix &A, const doublereal *b, doublereal *x, double
|
|||
|
||||
#include "cblas.h"
|
||||
#include "../../Cantera/src/ctlapack.h"
|
||||
using namespace Cantera;
|
||||
|
||||
template< class Matrix >
|
||||
inline int
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue