Commit 719d790f authored by Anton Gladky's avatar Anton Gladky
Browse files

Remove most of "using namespace std;"

parent 5786e832
......@@ -9,7 +9,6 @@
#include "DynLibManager.hpp"
#include<fstream>
#include<stdexcept>
#include<boost/filesystem/operations.hpp>
......@@ -18,9 +17,6 @@
#include "ClassFactory.hpp"
//using namespace std;
CREATE_LOGGER(DynLibManager);
......
......@@ -14,8 +14,6 @@
#include <cmath>
#include "utils.hpp"
using namespace std;
class STLReader {
public:
......
#pragma once
#include<utility>
using namespace std;
template<class T>
pair<T,T> minmax(const T &a, const T &b)
std::pair<T,T> minmax(const T &a, const T &b)
{
return (a<b) ? pair<T,T>(a,b) : pair<T,T>(b,a);
return (a<b) ? std::pair<T,T>(a,b) : std::pair<T,T>(b,a);
}
template<class T>
......
......@@ -35,9 +35,6 @@
#include<string>
#include<ostream>
using namespace std;
struct DynLibDispatcher_Item2D{ int ix1, ix2; std::string functorName; DynLibDispatcher_Item2D(int a, int b, std::string c):ix1(a),ix2(b),functorName(c){}; };
struct DynLibDispatcher_Item1D{ int ix1 ; std::string functorName; DynLibDispatcher_Item1D(int a, std::string c):ix1(a), functorName(c){}; };
///
......
......@@ -15,6 +15,11 @@
#include<boost/python/object.hpp>
#include<boost/version.hpp>
#include<boost/math/distributions/normal.hpp>
#include<yade/lib/base/Math.hpp>
#ifndef FOREACH
#define FOREACH BOOST_FOREACH
#endif
#ifndef __GXX_EXPERIMENTAL_CXX0X__
# include<boost/shared_ptr.hpp>
......@@ -24,13 +29,8 @@
using std::shared_ptr;
#endif
#ifndef FOREACH
#define FOREACH BOOST_FOREACH
#endif
using namespace std;
#include<yade/lib/base/Math.hpp>
using std::vector;
using std::string;
template<typename T>
struct GridContainer{
......
......@@ -17,7 +17,6 @@
typedef pair<pair<int,int>, vector<double> > Constriction;
using namespace std;
namespace CGT {
template<class _Tesselation>
......
......@@ -31,8 +31,6 @@
// #define USE_FAST_MATH 1
using namespace std;
namespace CGT
{
......
......@@ -30,8 +30,6 @@ extern "C" {
///_____ Declaration ____
using namespace std;
namespace CGT {
template<class _Tesselation, class FlowType=FlowBoundingSphere<_Tesselation> >
......
......@@ -39,8 +39,6 @@ extern "C" { void openblas_set_num_threads(int num_threads); }
namespace CGT
{
using namespace std;
#ifdef PARDISO
#ifdef AIX
#define F77_FUNC(func) func
......@@ -989,4 +987,4 @@ double t4 = taucs_ctime();
} //namespace CGT
#endif //FLOW_ENGINE
\ No newline at end of file
#endif //FLOW_ENGINE
......@@ -16,6 +16,10 @@
#include "Tenseur3.h"
namespace CGT {
using std::pair;
using std::ofstream;
#define SPHERE_DISCRETISATION 20; //number of "teta" intervals on the unit sphere
#define LINEAR_DISCRETISATION 200; //number of intervals on segments like [UNmin,UNmax]
......
......@@ -14,8 +14,6 @@
#define FAST
using namespace std;
namespace CGT {
// template<class Tesselation> const double Network<Tesselation>::FAR = 50000;
......
......@@ -11,8 +11,6 @@
#ifdef FLOW_ENGINE
using namespace std;
namespace CGT {
template<class _Tesselation>
......
......@@ -24,8 +24,6 @@
namespace CGT
{
using namespace std;
#ifdef PARDISO
#ifdef AIX
#define F77_FUNC(func) func
......@@ -251,4 +249,4 @@ int PeriodicFlowLinSolv<_Tesselation>::setLinearSystemFullGS(Real dt)
} //namespace CGT
#endif //FLOW_ENGINE
\ No newline at end of file
#endif //FLOW_ENGINE
#include "Tenseur3.h"
#include "RegularTriangulation.h"
using namespace std;
namespace CGT {
Real Tens::Norme2(void)
......
......@@ -6,6 +6,11 @@
namespace CGT {
using std::endl;
using std::cout;
using std::cerr;
using std::string;
#define NORMALIZE(vecteur) ((vecteur) = (vecteur)*(1.0/sqrt(pow((vecteur)[0],2)+pow((vecteur)[1],2)+pow((vecteur)[2],2))))
class Tens;
......
......@@ -6,13 +6,18 @@
* GNU General Public License v2 or later. See file LICENSE for details. *
*************************************************************************/
using namespace std;
//FIXME: handle that a better way
#define MAX_ID 200000
namespace CGT {
using std::cerr;
using std::cout;
using std::endl;
using std::max;
using std::vector;
using std::ifstream;
template<class TT>
_Tesselation<TT>::_Tesselation ( void )
{
......@@ -322,4 +327,4 @@ bool PeriodicTesselation<Tesselation>::redirect ( void )
return true;
}
} //namespace CGT
\ No newline at end of file
} //namespace CGT
#include <string.h>
#include "Timer.h"
using namespace std;
Real_timer::Real_timer() : T1(0), T2(0), elapsed(0.0), started(0.0), interv(0), running(true)
{
T1 = clock();
......
......@@ -4,6 +4,8 @@
#include <iostream>
#include <time.h>
using std::string;
// SECTION: A Timer Measuring Real-Time
// ========================================================================
//
......
......@@ -21,7 +21,9 @@
*/
namespace CGT {
using namespace std;
using std::string;
using std::min;
class TriaxialState
{
......
#include "basicVTKwritter.hpp"
using namespace std;
bool basicVTKwritter::open(const char * filename, const char * comment)
{
file.open(filename,ios_base::out);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment