removing use of using namespace std; 49/30049/4
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Fri, 7 Nov 2014 17:18:03 +0000 (17:18 +0000)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Mon, 10 Nov 2014 10:07:39 +0000 (02:07 -0800)
[Problem]
[Cause]
[Solution]

Change-Id: Ic1e4cafe06369ff5ed8da0a3d066021caa44e537

35 files changed:
automated-tests/src/dali/utc-Dali-GestureDetector.cpp
automated-tests/src/dali/utc-Dali-RenderableActor.cpp
automated-tests/src/dali/utc-Dali-Stage.cpp
dali/internal/event/actor-attachments/camera-attachment-impl.cpp
dali/internal/event/actor-attachments/image-attachment-impl.cpp
dali/internal/event/actor-attachments/mesh-attachment-impl.cpp
dali/internal/event/actors/actor-impl.cpp
dali/internal/event/animation/animation-impl.cpp
dali/internal/event/common/property-notification-impl.cpp
dali/internal/event/common/stage-impl.cpp
dali/internal/event/modeling/cloth-impl.cpp
dali/internal/event/modeling/mesh-impl.cpp
dali/internal/event/modeling/model-logger.cpp
dali/internal/event/resources/image-ticket.cpp
dali/internal/event/resources/resource-ticket.cpp
dali/internal/render/gl-resources/context.cpp
dali/internal/render/renderers/scene-graph-mesh-renderer.cpp
dali/internal/render/renderers/scene-graph-text-renderer.cpp
dali/internal/update/animation/scene-graph-animation.cpp
dali/internal/update/common/scene-graph-property-notification.cpp
dali/internal/update/modeling/scene-graph-mesh.cpp
dali/internal/update/node-attachments/node-attachment.cpp
dali/internal/update/node-attachments/scene-graph-camera-attachment.cpp
dali/internal/update/node-attachments/scene-graph-image-attachment.cpp
dali/internal/update/node-attachments/scene-graph-light-attachment.cpp
dali/internal/update/node-attachments/scene-graph-mesh-attachment.cpp
dali/internal/update/node-attachments/scene-graph-renderable-attachment.cpp
dali/internal/update/nodes/scene-graph-layer.cpp
dali/internal/update/resources/resource-manager.cpp
dali/public-api/actors/actor.cpp
dali/public-api/actors/custom-actor-impl.cpp
dali/public-api/common/stage.cpp
dali/public-api/geometry/mesh-data.cpp
dali/public-api/object/base-object.cpp
docs/templates/example-class-internal.cpp

index 42fad1e..10000bc 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
-using namespace std;
 
 void utc_dali_gesture_detector_startup(void)
 {
index 5361c55..63830e8 100644 (file)
@@ -24,7 +24,6 @@
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
-using namespace std;
 
 void renderable_actor_startup(void)
 {
index 57c730f..0f850e3 100644 (file)
@@ -27,7 +27,6 @@
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
-using namespace std;
 
 void stage_test_startup(void)
 {
index 767f848..8721fba 100644 (file)
@@ -23,8 +23,6 @@
 #include <dali/internal/event/common/stage-impl.h>
 #include <dali/internal/update/node-attachments/scene-graph-camera-attachment.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index 8bde322..6962bdb 100644 (file)
 #include <dali/internal/event/common/stage-impl.h>
 #include <dali/public-api/common/dali-common.h>
 
-using namespace std;
-
-namespace
-{
-static Dali::Internal::SceneGraph::ImageAttachment::PixelArea EMPTY_PIXEL_AREA(0,0,0,0);
-}
-
 namespace Dali
 {
 
@@ -55,7 +48,7 @@ ImageAttachmentPtr ImageAttachment::New( const SceneGraph::Node& parentNode )
 ImageAttachment::ImageAttachment( Stage& stage )
 : RenderableAttachment(stage),
   mSceneObject(NULL),
-  mPixelArea(EMPTY_PIXEL_AREA),
+  mPixelArea(0,0,0,0),
   mStyle(Dali::ImageActor::STYLE_QUAD),
   mBorder(0.45,0.45,0.1,0.1),
   mIsPixelAreaSet(false),
index 90ac633..45ba5e1 100644 (file)
@@ -25,8 +25,6 @@
 #include <dali/internal/event/common/stage-impl.h>
 #include <dali/internal/update/nodes/node.h>
 
-using namespace std;
-
 using Dali::Internal::MeshIPtr;
 using Dali::Internal::MaterialIPtr;
 
index 1ff9f47..203cc45 100644 (file)
@@ -61,8 +61,6 @@ using Dali::Internal::SceneGraph::Node;
 using Dali::Internal::SceneGraph::AnimatableProperty;
 using Dali::Internal::SceneGraph::PropertyBase;
 
-using namespace std;
-
 namespace Dali
 {
 
index f3b9702..2af1a77 100644 (file)
@@ -34,8 +34,6 @@
 #include <dali/internal/event/effects/shader-effect-impl.h>
 #include <dali/internal/event/common/thread-local-storage.h>
 
-using namespace std;
-
 using Dali::Internal::SceneGraph::UpdateManager;
 using Dali::Internal::SceneGraph::AnimatorBase;
 using Dali::Internal::SceneGraph::Shader;
@@ -986,7 +984,7 @@ void Animation::Resize(Actor& actor, float width, float height, AlphaFunction al
 
 void Animation::Resize(Actor& actor, float width, float height, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
-  Vector3 targetSize( width, height, min(width, height) );
+  Vector3 targetSize( width, height, std::min(width, height) );
 
   ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
 
index 713bc7e..834cfb4 100644 (file)
@@ -30,8 +30,6 @@
 #include <dali/internal/update/common/scene-graph-property-notification.h>
 #include <dali/internal/event/common/thread-local-storage.h>
 
-using namespace std;
-
 using Dali::Internal::SceneGraph::UpdateManager;
 
 namespace Dali
index de0c281..d26f950 100644 (file)
@@ -45,9 +45,6 @@
 #include <dali/integration-api/dynamics/dynamics-world-settings.h>
 #endif
 
-using namespace std;
-using namespace boost;
-
 using Dali::Internal::SceneGraph::Node;
 
 namespace Dali
index 125ada5..303d161 100644 (file)
@@ -24,8 +24,6 @@
 // INTERNAL INCLUDES
 #include <dali/internal/event/modeling/mesh-impl.h>
 
-using namespace std;
-
 namespace Dali
 {
 namespace Internal
index 1b5d69c..ac2a6f0 100644 (file)
@@ -31,8 +31,6 @@
 #include <dali/internal/update/manager/update-manager.h>
 #include <dali/internal/update/modeling/internal-mesh-data.h>
 
-using namespace std;
-
 namespace Dali
 {
 namespace Internal
index 4914752..c77aa4b 100644 (file)
@@ -37,7 +37,9 @@
 #include <dali/internal/event/animation/key-frames-impl.h>
 #include <dali/internal/event/modeling/model-impl.h>
 
-using namespace std;
+using std::cout;
+using std::endl;
+using std::string;
 
 namespace Dali
 {
index 2e65f10..fb3efc4 100644 (file)
@@ -19,8 +19,6 @@
 #include <dali/internal/event/resources/image-ticket.h>
 #include <dali/public-api/images/image-attributes.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index 60348f5..259d742 100644 (file)
@@ -28,8 +28,6 @@
 #include <dali/internal/event/resources/resource-ticket-observer.h>
 #include <dali/internal/event/resources/resource-ticket-lifetime-observer.h>
 
-using namespace std;
-
 namespace // unnamed namespace
 {
 
index 963eb15..eff48a5 100644 (file)
@@ -29,8 +29,6 @@
 #include <dali/internal/render/common/render-manager.h>
 #include <dali/integration-api/debug.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index 3d30d82..90b9838 100644 (file)
@@ -31,8 +31,6 @@
 #include <dali/internal/render/shaders/shader.h>
 #include <dali/internal/render/renderers/render-material.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index f3ec12e..b223923 100644 (file)
@@ -35,8 +35,6 @@
 #include <dali/internal/render/gl-resources/texture.h>
 #include <dali/internal/update/controllers/scene-controller.h>
 
-using namespace std;
-
 #if defined(DEBUG_ENABLED)
 namespace
 {
@@ -375,7 +373,7 @@ void TextRenderer::DoRender( BufferIndex bufferIndex, Program& program, const Ma
   const GLint smoothingLoc = program.GetUniformLocation( Program::UNIFORM_SMOOTHING );
   if( Program::UNIFORM_UNKNOWN != smoothingLoc )
   {
-    smoothWidth = min( min(mSmoothing, 1.0f - mSmoothing), smoothWidth );
+    smoothWidth = std::min( std::min(mSmoothing, 1.0f - mSmoothing), smoothWidth );
 
     if( mPixelSize < SMOOTHING_ADJUSTMENT_PIXEL_SIZE )
     {
@@ -398,7 +396,7 @@ void TextRenderer::DoRender( BufferIndex bufferIndex, Program& program, const Ma
         const Vector4& outlineColor = mTextParameters->GetOutlineColor();
         float outlineWidth = outline[1] + smoothWidth;
         float outlineStart = outline[0];
-        float outlineEnd = min( 1.0f, outlineStart + outlineWidth );
+        float outlineEnd = std::min( 1.0f, outlineStart + outlineWidth );
 
         program.SetUniform2f(outlineLoc, outlineStart, outlineEnd);
         program.SetUniform4f(outlineColorLoc, outlineColor.r, outlineColor.g, outlineColor.b, outlineColor.a);
index 7c4b744..c1a3d04 100644 (file)
@@ -24,8 +24,6 @@
 // INTERNAL INCLUDES
 #include <dali/internal/render/common/performance-monitor.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index 2396fda..e569c3b 100644 (file)
@@ -24,8 +24,6 @@
 #include <dali/internal/update/common/scene-graph-property-notification.h>
 #include <dali/internal/update/common/property-condition-functions.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index 321498d..205aff8 100644 (file)
@@ -23,8 +23,6 @@
 #include <dali/internal/render/gl-resources/context.h>
 #include <dali/internal/render/queue/render-queue.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index 28c03e6..659d109 100644 (file)
@@ -22,8 +22,6 @@
 #include <dali/internal/update/nodes/node.h>
 #include <dali/public-api/common/dali-common.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index 868ae59..7becbff 100644 (file)
 #include <dali/internal/update/resources/resource-manager.h>
 #include <dali/integration-api/debug.h>
 
-using namespace std;
-
 namespace // unnamed namespace
 {
-static unsigned int UPDATE_COUNT        = 2u; // Update projection or view matrix this many frames after a change
-static unsigned int COPY_PREVIOUS_PROJECTION = 1u; // Copy projection matrix from previous frame
+const unsigned int UPDATE_COUNT        = 2u; // Update projection or view matrix this many frames after a change
+const unsigned int COPY_PREVIOUS_PROJECTION = 1u; // Copy projection matrix from previous frame
 }
 
 namespace Dali
index 3305c7c..f1d5a13 100644 (file)
@@ -25,8 +25,6 @@
 #include <dali/internal/update/resources/resource-manager.h>
 #include <dali/integration-api/debug.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index dcf471e..897606c 100644 (file)
@@ -41,9 +41,6 @@
 #include <dali/internal/render/shaders/program.h>
 #include <dali/internal/render/shaders/shader.h>
 
-
-using namespace std;
-
 namespace Dali
 {
 
index 3d0e5e5..8b4e428 100644 (file)
@@ -21,9 +21,6 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 
-
-using namespace std;
-
 namespace Dali
 {
 
index 25526ff..1bacd0d 100644 (file)
@@ -48,7 +48,6 @@
 #include <dali/internal/render/common/texture-cache-dispatcher.h>
 #include <dali/internal/render/common/post-process-resource-dispatcher.h>
 
-using namespace std;
 using namespace Dali::Integration;
 
 using Dali::Internal::SceneGraph::DiscardQueue;
@@ -60,33 +59,33 @@ namespace Dali
 namespace Internal
 {
 
-typedef set<ResourceId>                       LiveRequestContainer;
-typedef LiveRequestContainer::iterator        LiveRequestIter;
-typedef LiveRequestContainer::size_type       LiveRequestSize;
+typedef std::set<ResourceId>                     LiveRequestContainer;
+typedef LiveRequestContainer::iterator           LiveRequestIter;
+typedef LiveRequestContainer::size_type          LiveRequestSize;
 
-typedef map<ResourceId, ResourceTypeId>       DeadRequestContainer;
-typedef DeadRequestContainer::iterator        DeadRequestIter;
-typedef pair<ResourceId, ResourceTypeId>      DeadRequestPair;
+typedef std::map<ResourceId, ResourceTypeId>     DeadRequestContainer;
+typedef DeadRequestContainer::iterator           DeadRequestIter;
+typedef std::pair<ResourceId, ResourceTypeId>    DeadRequestPair;
 
-typedef vector<ResourceId>                    NotifyQueue;
-typedef NotifyQueue::iterator                 NotifyQueueIter;
+typedef std::vector<ResourceId>                  NotifyQueue;
+typedef NotifyQueue::iterator                    NotifyQueueIter;
 
-typedef map<ResourceId, BitmapMetadata>       BitmapMetadataCache;
-typedef BitmapMetadataCache::iterator         BitmapMetadataIter;
-typedef pair<ResourceId, BitmapMetadata>      BitmapMetadataPair;
+typedef std::map<ResourceId, BitmapMetadata>     BitmapMetadataCache;
+typedef BitmapMetadataCache::iterator            BitmapMetadataIter;
+typedef std::pair<ResourceId, BitmapMetadata>    BitmapMetadataPair;
 
-typedef map<ResourceId, ModelDataPtr>         ModelCache;
-typedef ModelCache::iterator                  ModelCacheIter;
-typedef pair<ResourceId, ModelDataPtr>        ModelDataPair;
+typedef std::map<ResourceId, ModelDataPtr>       ModelCache;
+typedef ModelCache::iterator                     ModelCacheIter;
+typedef std::pair<ResourceId, ModelDataPtr>      ModelDataPair;
 
-typedef map<ResourceId, SceneGraph::Mesh*>    MeshCache;
-typedef MeshCache::iterator                   MeshCacheIter;
-typedef pair<ResourceId, SceneGraph::Mesh*>   MeshDataPair;
+typedef std::map<ResourceId, SceneGraph::Mesh*>  MeshCache;
+typedef MeshCache::iterator                      MeshCacheIter;
+typedef std::pair<ResourceId, SceneGraph::Mesh*> MeshDataPair;
 
-typedef map<ResourceId, ShaderDataPtr>        ShaderCache;
-typedef ShaderCache::iterator                 ShaderCacheIter;
-typedef ShaderCache::size_type                ShaderCacheSize;
-typedef pair<ResourceId, ShaderDataPtr>       ShaderDataPair;
+typedef std::map<ResourceId, ShaderDataPtr>      ShaderCache;
+typedef ShaderCache::iterator                    ShaderCacheIter;
+typedef ShaderCache::size_type                   ShaderCacheSize;
+typedef std::pair<ResourceId, ShaderDataPtr>     ShaderDataPair;
 
 static inline bool RemoveId( LiveRequestContainer& container, ResourceId id )
 {
index bd56f4b..1e8abf1 100644 (file)
@@ -43,8 +43,6 @@
 #include <dali/internal/event/dynamics/dynamics-world-impl.h>
 #endif
 
-using namespace std;
-
 namespace Dali
 {
 
index c393604..d27d22f 100644 (file)
@@ -22,8 +22,6 @@
 #include <dali/public-api/common/dali-common.h>
 #include <dali/internal/event/actors/custom-actor-internal.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index dac376b..f70b46d 100644 (file)
@@ -35,8 +35,6 @@
 #include <dali/internal/event/dynamics/dynamics-world-impl.h>
 #endif
 
-using namespace std;
-
 namespace Dali
 {
 
index 7905ee2..02df6e5 100644 (file)
 #include <dali/public-api/math/matrix.h>
 #include <dali/integration-api/debug.h>
 
-using namespace std;
-
 namespace Dali
 {
 
 namespace // unnamed namespace
 {
-static const float kBoundsDefault = 1e10f;
+const float kBoundsDefault = 1e10f;
 } // unnamed namespace
 
 using Dali::Vector4;
index 4535bbe..43f4c29 100644 (file)
@@ -25,8 +25,6 @@
 #include <dali/internal/event/common/stage-impl.h>
 #include <dali/internal/event/common/type-registry-impl.h>
 
-using namespace std;
-
 namespace Dali
 {
 
index 54cb33b..eecf5cb 100644 (file)
@@ -24,8 +24,6 @@
 // Dali includes
 #include "actor.h"
 
-using namespace std;
-
 namespace // unnamed namespace start
 {