From: Kimmo Hoikka Date: Thu, 11 Oct 2018 12:54:35 +0000 (+0100) Subject: Fixes for https://review.tizen.org/gerrit/#/c/190831/ X-Git-Tag: dali_1.3.47~7^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=6ee60a4707b044b20fbe33015d58ccf02164b671 Fixes for https://review.tizen.org/gerrit/#/c/190831/ Change-Id: I3e04b0e97169ac5ee5a3cd77be74fab61b644f45 --- diff --git a/dali/internal/system/common/object-profiler.cpp b/dali/internal/system/common/object-profiler.cpp index 48bba93..6ddc44b 100644 --- a/dali/internal/system/common/object-profiler.cpp +++ b/dali/internal/system/common/object-profiler.cpp @@ -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[] = { diff --git a/dali/internal/system/common/object-profiler.h b/dali/internal/system/common/object-profiler.h index c6a265c..7d38783 100644 --- a/dali/internal/system/common/object-profiler.h +++ b/dali/internal/system/common/object-profiler.h @@ -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 // uint32_t +#include // size_t #include #include #include @@ -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;