Merge "Clean up the code to build successfully on macOS" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / update / common / uniform-map.cpp
index a1400e5..c68ac13 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 
-#include "uniform-map.h"
+// CLASS HEADER
+#include <dali/internal/update/common/uniform-map.h>
 
 namespace Dali
 {
@@ -22,10 +23,7 @@ namespace Internal
 {
 namespace SceneGraph
 {
-
-UniformMap::UniformMap()
-{
-}
+UniformMap::UniformMap() = default;
 
 UniformMap::~UniformMap()
 {
@@ -70,10 +68,6 @@ void UniformMap::MappingChanged()
   }
 }
 
-// @todo MESH_REWORK Benchmark and test
-// The uniform map can never grow beyond the limits of GL - so really, the
-// map size is likely to be small; if retaining an unsorted map proves to be
-// slow, then it should be changed to perform an insertion sort.
 void UniformMap::Add( UniformPropertyMapping* newMap )
 {
   UniformPropertyMapping::Hash nameHash = CalculateHash( newMap->uniformName );
@@ -151,15 +145,15 @@ const PropertyInputImpl* UniformMap::Find( const std::string& uniformName )
       }
     }
   }
-  return NULL;
+  return nullptr;
 }
 
-unsigned int UniformMap::Count() const
+UniformMap::SizeType UniformMap::Count() const
 {
-  return mUniformMaps.Count();
+  return static_cast<UniformMap::SizeType>( mUniformMaps.Count() );
 }
 
-const UniformPropertyMapping& UniformMap::operator[]( unsigned int index ) const
+const UniformPropertyMapping& UniformMap::operator[]( UniformMap::SizeType index ) const
 {
   return *mUniformMaps[index];
 }