From adc1cf240fcdb5acf24850411b85b76b39dd992f Mon Sep 17 00:00:00 2001 From: Francisco Santos Date: Fri, 13 Jan 2017 17:21:45 +0000 Subject: [PATCH] Functions that return value types should not return them as const. It is ignored by the compiler and produces warnings. Change-Id: I8f46f597718f72c15a4ca17f98751adf00057c20 --- adaptors/base/performance-logging/performance-marker.cpp | 2 +- adaptors/base/performance-logging/performance-marker.h | 2 +- adaptors/base/performance-logging/statistics/stat-context-manager.cpp | 4 ++-- adaptors/base/performance-logging/statistics/stat-context-manager.h | 4 ++-- adaptors/base/performance-logging/statistics/stat-context.cpp | 4 ++-- adaptors/base/performance-logging/statistics/stat-context.h | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/adaptors/base/performance-logging/performance-marker.cpp b/adaptors/base/performance-logging/performance-marker.cpp index 05b3258..4b1a883 100644 --- a/adaptors/base/performance-logging/performance-marker.cpp +++ b/adaptors/base/performance-logging/performance-marker.cpp @@ -77,7 +77,7 @@ PerformanceMarker::PerformanceMarker( PerformanceInterface::MarkerType type, Fra { } -const char* const PerformanceMarker::GetName( ) const +const char* PerformanceMarker::GetName( ) const { return MARKER_LOOKUP[ mType ].name; } diff --git a/adaptors/base/performance-logging/performance-marker.h b/adaptors/base/performance-logging/performance-marker.h index 9651770..a1c429f 100644 --- a/adaptors/base/performance-logging/performance-marker.h +++ b/adaptors/base/performance-logging/performance-marker.h @@ -111,7 +111,7 @@ public: /** * @return marker name */ - const char* const GetName( ) const; + const char* GetName( ) const; /** * @param start the start marker diff --git a/adaptors/base/performance-logging/statistics/stat-context-manager.cpp b/adaptors/base/performance-logging/statistics/stat-context-manager.cpp index bdc86ec..b5dbb8c 100644 --- a/adaptors/base/performance-logging/statistics/stat-context-manager.cpp +++ b/adaptors/base/performance-logging/statistics/stat-context-manager.cpp @@ -174,7 +174,7 @@ void StatContextManager::SetLoggingFrequency( unsigned int logFrequency, context->SetLogFrequency( logFrequency ); } } -const char* const StatContextManager::GetContextName(PerformanceInterface::ContextId contextId) const +const char* StatContextManager::GetContextName(PerformanceInterface::ContextId contextId) const { StatContext* context = GetContext(contextId); if( context ) @@ -184,7 +184,7 @@ const char* const StatContextManager::GetContextName(PerformanceInterface::Conte return "context not found"; } -const char* const StatContextManager::GetMarkerDescription( PerformanceInterface::MarkerType type, PerformanceInterface::ContextId contextId ) const +const char* StatContextManager::GetMarkerDescription( PerformanceInterface::MarkerType type, PerformanceInterface::ContextId contextId ) const { StatContext* context = GetContext(contextId); if( context ) diff --git a/adaptors/base/performance-logging/statistics/stat-context-manager.h b/adaptors/base/performance-logging/statistics/stat-context-manager.h index 9e9abe1..305228d 100644 --- a/adaptors/base/performance-logging/statistics/stat-context-manager.h +++ b/adaptors/base/performance-logging/statistics/stat-context-manager.h @@ -98,7 +98,7 @@ public: * @param[in] contextId id of the context to get the name * @return context name */ - const char* const GetContextName( PerformanceInterface::ContextId contextId ) const; + const char* GetContextName( PerformanceInterface::ContextId contextId ) const; /** * @brief Get the full description of a marker for this context @@ -106,7 +106,7 @@ public: * @param[in] contextId id of the context to get the name * @return marker description in relation to this context */ - const char* const GetMarkerDescription( PerformanceInterface::MarkerType type, PerformanceInterface::ContextId contextId ) const; + const char* GetMarkerDescription( PerformanceInterface::MarkerType type, PerformanceInterface::ContextId contextId ) const; /** diff --git a/adaptors/base/performance-logging/statistics/stat-context.cpp b/adaptors/base/performance-logging/statistics/stat-context.cpp index de0a4fc..1189c8c 100644 --- a/adaptors/base/performance-logging/statistics/stat-context.cpp +++ b/adaptors/base/performance-logging/statistics/stat-context.cpp @@ -74,12 +74,12 @@ unsigned int StatContext::GetId() const return mId; } -const char* const StatContext::GetName() const +const char* StatContext::GetName() const { return mName; } -const char* const StatContext::GetMarkerDescription( PerformanceInterface::MarkerType type ) const +const char* StatContext::GetMarkerDescription( PerformanceInterface::MarkerType type ) const { if( type == PerformanceInterface::START ) { diff --git a/adaptors/base/performance-logging/statistics/stat-context.h b/adaptors/base/performance-logging/statistics/stat-context.h index 2408905..1ab1cba 100644 --- a/adaptors/base/performance-logging/statistics/stat-context.h +++ b/adaptors/base/performance-logging/statistics/stat-context.h @@ -75,7 +75,7 @@ public: /** * @return the context name */ - const char* const GetName() const; + const char* GetName() const; /** * @@ -84,7 +84,7 @@ public: * @param[in] type marker type, for a customer marker this will be either START or END * @return the full description for a marker */ - const char* const GetMarkerDescription( PerformanceInterface::MarkerType type ) const; + const char* GetMarkerDescription( PerformanceInterface::MarkerType type ) const; /** * @brief Set the frequency for logging -- 2.7.4