Add extra std headers and use fabs, fround where needed.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / image-loader / atlas-packer.cpp
index 26ad3e0..4becddf 100644 (file)
@@ -19,7 +19,7 @@
 #include "atlas-packer.h"
 
 // EXTERNAL HEADER
-#include <stdlib.h> // For abs()
+#include <cstdlib> // For abs()
 #include <dali/integration-api/debug.h>
 
 namespace Dali
@@ -36,7 +36,7 @@ namespace
 
 bool ApproximatelyEqual( uint32_t a, uint32_t b  )
 {
-  return abs( a-b ) <= 1;
+  return std::abs( static_cast<int32_t>( a - b ) ) <= 1;
 }
 
 uint16_t MaxDimension( const Uint16Pair& dimensions )