yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #11026
[Branch ~yade-pkg/yade/git-trunk] Rev 4052: Remove some more "using namespace std; "
------------------------------------------------------------
revno: 4052
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2014-07-02 21:23:14 +0200
message:
Remove some more "using namespace std;"
modified:
core/Omega.cpp
core/Omega.hpp
gui/qt4/GLViewer.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 'core/Omega.cpp'
--- core/Omega.cpp 2014-07-02 16:11:24 +0000
+++ core/Omega.cpp 2014-07-02 19:23:14 +0000
@@ -71,8 +71,8 @@
-Real Omega::getRealTime(){ return (microsec_clock::local_time()-startupLocalTime).total_milliseconds()/1e3; }
-time_duration Omega::getRealTime_duration(){return microsec_clock::local_time()-startupLocalTime;}
+Real Omega::getRealTime(){ return (boost::posix_time::microsec_clock::local_time()-startupLocalTime).total_milliseconds()/1e3; }
+boost::posix_time::time_duration Omega::getRealTime_duration(){return boost::posix_time::microsec_clock::local_time()-startupLocalTime;}
void Omega::initTemps(){
@@ -107,7 +107,7 @@
}
void Omega::timeInit(){
- startupLocalTime=microsec_clock::local_time();
+ startupLocalTime=boost::posix_time::microsec_clock::local_time();
}
void Omega::createSimulationLoop(){ simulationLoop=shared_ptr<ThreadRunner>(new ThreadRunner(&simulationFlow_));}
=== modified file 'core/Omega.hpp'
--- core/Omega.hpp 2014-07-02 16:11:24 +0000
+++ core/Omega.hpp 2014-07-02 19:23:14 +0000
@@ -48,9 +48,6 @@
class Scene;
class ThreadRunner;
-using namespace boost::posix_time;
-using namespace std;
-
struct DynlibDescriptor{
set<string> baseClasses;
bool isIndexable, isFactorable, isSerializable;
@@ -66,7 +63,7 @@
int currentSceneNb;
shared_ptr<Scene> sceneAnother; // used for temporarily running different simulation, in Omega().switchscene()
- ptime startupLocalTime;
+ boost::posix_time::ptime startupLocalTime;
map<string,string> memSavedSimulations;
@@ -117,7 +114,7 @@
//! Return unique temporary filename. May be deleted by the user; if not, will be deleted at shutdown.
string tmpFilename();
Real getRealTime();
- time_duration getRealTime_duration();
+ boost::posix_time::time_duration getRealTime_duration();
// configuration directory used for logging config and possibly other things
std::string confDir;
=== modified file 'gui/qt4/GLViewer.cpp'
--- gui/qt4/GLViewer.cpp 2014-07-02 16:11:24 +0000
+++ gui/qt4/GLViewer.cpp 2014-07-02 19:23:14 +0000
@@ -425,7 +425,7 @@
string GLViewer::getRealTimeString(){
ostringstream oss;
- time_duration t=Omega::instance().getRealTime_duration();
+ boost::posix_time::time_duration t=Omega::instance().getRealTime_duration();
unsigned d=t.hours()/24,h=t.hours()%24,m=t.minutes(),s=t.seconds();
oss<<"clock ";
if(d>0) oss<<d<<"days "<<_W2<<h<<":"<<_W2<<m<<":"<<_W2<<s;