From 090e0e438e8bd98f32be1cf41ee99811b805b90d Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Wed, 17 Nov 2021 16:42:24 +0100 Subject: [PATCH] removing using namespace std from header files --- wrap/gcache/cache.h | 4 ++-- wrap/gui/frustum.h | 2 +- wrap/gui/trackmode.cpp | 10 +++++----- wrap/gui/trackutils.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wrap/gcache/cache.h b/wrap/gcache/cache.h index f25ab1ea..f790690e 100644 --- a/wrap/gcache/cache.h +++ b/wrap/gcache/cache.h @@ -26,7 +26,7 @@ typedef unsigned __int64 uint64_t; #include "provider.h" -using namespace std; +//using namespace std; /* this cache system enforce the rule that the items in a cache are always in all the cache below */ /* two mechanism to remove tokens from the cache: 1) set token count to something low @@ -169,7 +169,7 @@ protected: if(unload() || load()) { new_data.testAndSetOrdered(0, 1); //if not changed, set as changed input->check_queue.open(); //we signal ourselves to check again - cout << "loaded or unloaded\n"; + std::cout << "loaded or unloaded\n"; } input->check_queue.leave(); } diff --git a/wrap/gui/frustum.h b/wrap/gui/frustum.h index 49a3f6af..8f6108ca 100644 --- a/wrap/gui/frustum.h +++ b/wrap/gui/frustum.h @@ -59,7 +59,7 @@ Adding copyright. #include #include -using namespace std; +//using namespace std; namespace vcg { diff --git a/wrap/gui/trackmode.cpp b/wrap/gui/trackmode.cpp index 7365c764..5c2d29f5 100644 --- a/wrap/gui/trackmode.cpp +++ b/wrap/gui/trackmode.cpp @@ -82,7 +82,7 @@ void SphereMode::Apply (Trackball * tb, Point3f new_point) // Figure out how much to rotate around that axis. // float phi = Distance (hitNew, hitOld) / tb->radius; // float phi = vcg::Angle(hitNew - center,hitOld - center)*(Distance(hitNew,center)/tb->radius); - float phi = max(vcg::Angle(hitNew - center,hitOld - center),(Distance(hitNew,hitOld)/tb->radius)) ; + float phi = std::max(vcg::Angle(hitNew - center,hitOld - center),(Distance(hitNew,hitOld)/tb->radius)) ; tb->track.rot = Quaternionf (-phi, axis) * tb->last_track.rot; } @@ -128,12 +128,12 @@ void ZMode::Draw(Trackball * tb){ // Scale mode implementation. void ScaleMode::Apply (Trackball * tb, float WheelNotch) { - tb->track.sca *= pow (1.2f, -WheelNotch); + tb->track.sca *= std::pow (1.2f, -WheelNotch); } void ScaleMode::Apply (Trackball * tb, Point3f new_point) { - tb->track.sca = tb->last_track.sca * pow (3.0f, -(getDeltaY(tb,new_point))); + tb->track.sca = tb->last_track.sca * std::pow (3.0f, -(getDeltaY(tb,new_point))); } void ScaleMode::Draw(Trackball * tb){ @@ -787,7 +787,7 @@ void NavigatorWasdMode::Animate(unsigned int msec, Trackball * tb){ float vel = current_speed_h.Norm(); if (veltrack.tra[1]+=step_last; diff --git a/wrap/gui/trackutils.h b/wrap/gui/trackutils.h index 4e3d1ede..6df38318 100644 --- a/wrap/gui/trackutils.h +++ b/wrap/gui/trackutils.h @@ -35,7 +35,7 @@ #include #include #include -using namespace std; +//using namespace std; namespace vcg {