Fixes for https://review.tizen.org/gerrit/#/c/190831/ 31/191131/2
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Thu, 11 Oct 2018 12:54:35 +0000 (13:54 +0100)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Thu, 11 Oct 2018 13:03:28 +0000 (14:03 +0100)
Change-Id: I3e04b0e97169ac5ee5a3cd77be74fab61b644f45

dali/internal/system/common/object-profiler.cpp
dali/internal/system/common/object-profiler.h

index 48bba93..6ddc44b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 20187 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.
@@ -37,7 +37,7 @@ namespace Internal
 namespace Adaptor
 {
 
-ObjectProfiler::ObjectProfiler( unsigned int timeInterval )
+ObjectProfiler::ObjectProfiler( uint32_t timeInterval )
 {
   // This class must be created after the Stage; this means it doesn't count the initial objects
   // that are created by the stage (base layer, default camera actor)
@@ -59,7 +59,7 @@ void ObjectProfiler::DisplayInstanceCounts()
 {
   for( auto&& element : mInstanceCountContainer )
   {
-    int memorySize = GetMemorySize( element.first, element.second );
+    std::size_t memorySize = GetMemorySize( element.first, element.second );
     if( memorySize > 0 )
     {
       LogMessage( Debug::DebugInfo, "%-30s: % 4d  Memory MemorySize: ~% 6.1f kB\n",
@@ -134,12 +134,12 @@ void ObjectProfiler::OnObjectDestroyed(const Dali::RefObject* object)
   }
 }
 
-int ObjectProfiler::GetMemorySize(const std::string& name, int count)
+std::size_t ObjectProfiler::GetMemorySize( const std::string& name, uint32_t count )
 {
   struct MemoryMemorySize
   {
     std::string name;
-    int memorySize;
+    std::size_t memorySize;
   };
   MemoryMemorySize memoryMemorySizes[] =
     {
index c6a265c..7d38783 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_ADAPTOR_OBJECT_PROFILER_H__
 
 /*
- * Copyright (c) 2017 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.
@@ -19,6 +19,8 @@
  */
 
 // EXTERNAL INCLUDES
+#include <cstdint> // uint32_t
+#include <cstddef> // size_t
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/object-registry.h>
 #include <dali/public-api/object/type-registry.h>
@@ -45,7 +47,7 @@ public:
    * Constructor
    * @param timeInterval to specify the frequency of reporting
    */
-  ObjectProfiler( unsigned int timeInterval );
+  ObjectProfiler( uint32_t timeInterval );
 
   /**
    * Destructor
@@ -67,22 +69,22 @@ private:
    * Callback used when objects are created. Increases instance count for that object type
    * @param[in] handle of the created object
    */
-  void OnObjectCreated(BaseHandle handle);
+  void OnObjectCreated( BaseHandle handle );
 
   /**
    * Callback used when objects are created. Decreases instance count for that object type
    * @param[in] object The object being destroyed
    */
-  void OnObjectDestroyed(const Dali::RefObject* object);
+  void OnObjectDestroyed( const Dali::RefObject* object );
 
   /**
    * Get the memory size of the given object
    */
-  int GetMemorySize(const std::string& name, int count);
+  std::size_t GetMemorySize( const std::string& name, uint32_t count );
 
 private:
 
-  using InstanceCountPair = std::pair< const std::string, int >;
+  using InstanceCountPair = std::pair< const std::string, uint32_t >;
   using InstanceTypePair = std::pair< BaseObject*, std::string >;
 
   Dali::ObjectRegistry    mObjectRegistry;