From 32afe97ebd9c807d2c63f097af12e77314479c44 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 23 Jan 2012 03:37:08 +0000 Subject: [PATCH] Removed 'using namespace Cantera' from all header files --- Cantera/cxx/demos/kinetics1/example_utils.h | 2 -- Cantera/fortran/src/fct.cpp | 2 ++ Cantera/fortran/src/flib_defs.h | 3 --- apps/bvp/AxiStagnBVP.h | 4 ++-- apps/bvp/BoundaryValueProblem.h | 9 ++++----- apps/bvp/blasius.cpp | 4 ++-- ext/f2c_math/gmres.h | 1 - ext/math/gmres.h | 1 - test_problems/cxx_ex/example_utils.h | 2 -- 9 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Cantera/cxx/demos/kinetics1/example_utils.h b/Cantera/cxx/demos/kinetics1/example_utils.h index 6a3100510..5426c8871 100644 --- a/Cantera/cxx/demos/kinetics1/example_utils.h +++ b/Cantera/cxx/demos/kinetics1/example_utils.h @@ -4,8 +4,6 @@ #include #include -using namespace Cantera; - // Save the temperature, density, pressure, and mole fractions at one // time template diff --git a/Cantera/fortran/src/fct.cpp b/Cantera/fortran/src/fct.cpp index afd629355..fa6c3ba0c 100644 --- a/Cantera/fortran/src/fct.cpp +++ b/Cantera/fortran/src/fct.cpp @@ -20,6 +20,8 @@ #include "flib_defs.h" +using namespace Cantera; + // Assert that there is storage // for the templated classes' static member // (needed to compile on solaris) diff --git a/Cantera/fortran/src/flib_defs.h b/Cantera/fortran/src/flib_defs.h index dafdbf641..c0f7324a8 100644 --- a/Cantera/fortran/src/flib_defs.h +++ b/Cantera/fortran/src/flib_defs.h @@ -18,7 +18,4 @@ typedef integer status_t; -namespace Cantera {} -using namespace Cantera; - #endif diff --git a/apps/bvp/AxiStagnBVP.h b/apps/bvp/AxiStagnBVP.h index ddc65702f..7f4abc4e7 100644 --- a/apps/bvp/AxiStagnBVP.h +++ b/apps/bvp/AxiStagnBVP.h @@ -123,8 +123,8 @@ int main() { eqs.writeCSV(); return 0; } - catch (CanteraError) { - showErrors(cerr); + catch (Cantera::CanteraError) { + Cantera::showErrors(std::cerr); return -1; } } diff --git a/apps/bvp/BoundaryValueProblem.h b/apps/bvp/BoundaryValueProblem.h index 6083fd42f..2f79a8826 100644 --- a/apps/bvp/BoundaryValueProblem.h +++ b/apps/bvp/BoundaryValueProblem.h @@ -7,7 +7,6 @@ #include #include -using namespace Cantera; /// Namespace for the boundary value problem package. namespace BVP { @@ -63,7 +62,7 @@ namespace BVP { * Class BoundaryValueProblem derives from Cantera's Domain1D * class. */ - class BoundaryValueProblem : public Domain1D { + class BoundaryValueProblem : public Cantera::Domain1D { public: @@ -197,9 +196,9 @@ namespace BVP { protected: - Domain1D* m_left; ///< dummy terminator - Domain1D* m_right; ///< dummy terminator - Sim1D* m_sim; ///< controller for solution + Cantera::Domain1D* m_left; ///< dummy terminator + Cantera::Domain1D* m_right; ///< dummy terminator + Cantera::Sim1D* m_sim; ///< controller for solution /** diff --git a/apps/bvp/blasius.cpp b/apps/bvp/blasius.cpp index 5b09cd991..43b2908ea 100644 --- a/apps/bvp/blasius.cpp +++ b/apps/bvp/blasius.cpp @@ -111,8 +111,8 @@ int main() { eqs.writeCSV(); return 0; } - catch (CanteraError) { - showErrors(cerr); + catch (Cantera::CanteraError) { + Cantera::showErrors(std::cerr); return -1; } } diff --git a/ext/f2c_math/gmres.h b/ext/f2c_math/gmres.h index 1f6a044d5..8bde197c2 100644 --- a/ext/f2c_math/gmres.h +++ b/ext/f2c_math/gmres.h @@ -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 diff --git a/ext/math/gmres.h b/ext/math/gmres.h index 1f6a044d5..8bde197c2 100755 --- a/ext/math/gmres.h +++ b/ext/math/gmres.h @@ -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 diff --git a/test_problems/cxx_ex/example_utils.h b/test_problems/cxx_ex/example_utils.h index 616969705..3bd3aa620 100755 --- a/test_problems/cxx_ex/example_utils.h +++ b/test_problems/cxx_ex/example_utils.h @@ -4,8 +4,6 @@ #include #include -using namespace Cantera; - // Save the temperature, density, pressure, and mole fractions at one // time template