yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #11027
[Branch ~yade-pkg/yade/git-trunk] Rev 4053: Remove "using namespace std; " everywhere. Tests are failing.
------------------------------------------------------------
revno: 4053
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Thu 2014-07-03 09:15:45 +0200
message:
Remove "using namespace std;" everywhere. Tests are failing.
modified:
gui/qt4/GLViewer.hpp
lib/factory/DynLibManager.hpp
lib/serialization/Serializable.hpp
pkg/dem/ViscoelasticPM.cpp
pkg/pfv/PeriodicFlowEngine.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'gui/qt4/GLViewer.hpp'
--- gui/qt4/GLViewer.hpp 2014-07-02 16:11:24 +0000
+++ gui/qt4/GLViewer.hpp 2014-07-03 07:15:45 +0000
@@ -14,6 +14,10 @@
#include<QGLViewer/constraint.h>
#include<set>
+using std::setw;
+using std::setfill;
+using std::setprecision;
+
/*! Class handling user interaction with the openGL rendering of simulation.
*
* Clipping planes:
=== modified file 'lib/factory/DynLibManager.hpp'
--- lib/factory/DynLibManager.hpp 2014-07-02 16:11:24 +0000
+++ lib/factory/DynLibManager.hpp 2014-07-03 07:15:45 +0000
@@ -15,11 +15,18 @@
#include <iostream>
#include <map>
#include <vector>
+#include <set>
+#include <list>
#include<yade/lib/base/Logging.hpp>
-using namespace std;
-
+using std::type_info;
+using std::string;
+using std::vector;
+using std::list;
+using std::set;
+using std::map;
+using std::istringstream;
class DynLibManager
{
@@ -34,18 +41,18 @@
bool load(const std::string& libName);
- bool unload (const string& libName);
- bool isLoaded (const string& libName);
+ bool unload (const std::string& libName);
+ bool isLoaded (const std::string& libName);
bool unloadAll ();
void setAutoUnload ( bool enabled );
- string lastError();
+ std::string lastError();
DECLARE_LOGGER;
private :
- bool closeLib(const string libName);
+ bool closeLib(const std::string libName);
bool error();
- string lastError_;
+ std::string lastError_;
};
=== modified file 'lib/serialization/Serializable.hpp'
--- lib/serialization/Serializable.hpp 2014-07-02 16:11:24 +0000
+++ lib/serialization/Serializable.hpp 2014-07-03 07:15:45 +0000
@@ -36,7 +36,28 @@
#include<yade/lib/base/Math.hpp>
-using namespace std;
+using std::endl;
+using std::cout;
+using std::cerr;
+using std::vector;
+using std::string;
+using std::list;
+using std::min;
+using std::max;
+using std::ifstream;
+using std::ofstream;
+using std::pair;
+using std::runtime_error;
+using std::logic_error;
+using std::invalid_argument;
+using std::ios;
+using std::ios_base;
+using std::fstream;
+using std::ostream;
+using std::ostringstream;
+using std::swap;
+using std::make_pair;
+
// empty functions for ADL
//namespace{
template<typename T> void preLoad(T&){}; template<typename T> void postLoad(T& obj){ /* cerr<<"Generic no-op postLoad("<<typeid(T).name()<<"&) called for "<<obj.getClassName()<<std::endl; */ }
=== modified file 'pkg/dem/ViscoelasticPM.cpp'
--- pkg/dem/ViscoelasticPM.cpp 2014-07-02 16:11:24 +0000
+++ pkg/dem/ViscoelasticPM.cpp 2014-07-03 07:15:45 +0000
@@ -10,6 +10,7 @@
#include<yade/pkg/common/SPHEngine.hpp>
#endif
+using std::isfinite;
YADE_PLUGIN((ViscElMat)(ViscElPhys)(Ip2_ViscElMat_ViscElMat_ViscElPhys)(Law2_ScGeom_ViscElPhys_Basic));
/* ViscElMat */
=== modified file 'pkg/pfv/PeriodicFlowEngine.cpp'
--- pkg/pfv/PeriodicFlowEngine.cpp 2014-07-02 16:11:24 +0000
+++ pkg/pfv/PeriodicFlowEngine.cpp 2014-07-03 07:15:45 +0000
@@ -434,7 +434,7 @@
totVol+=newVol;
dVol=cell->info().volumeSign * ( newVol - cell->info().volume() );
totDVol+=dVol;
- epsVolMax = max ( epsVolMax, abs ( dVol/newVol ) );
+ epsVolMax = max ( epsVolMax, std::abs ( dVol/newVol ) );
cell->info().dv() = dVol * invDeltaT;
cell->info().volume() = newVol;
}