From bb46dde88befe14583eaac83f65775a7543d4586 Mon Sep 17 00:00:00 2001 From: Rob Hughes Date: Wed, 20 May 2020 15:27:37 +0100 Subject: Fix a few build warnings: * Remove redundant asserts for unsigned ints being positive * Remove unneeded include of lightweight_test.hpp header * Remove unused exception variable names * Replace hardcoded 0.0f with T() for some template functions * Add a few static_casts Change-Id: I290b0433cf995f6d0199422eaa10f816e5fd8eb9 Signed-off-by: Robert Hughes --- src/profiling/test/ProfilingMocks.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/profiling/test/ProfilingMocks.hpp') diff --git a/src/profiling/test/ProfilingMocks.hpp b/src/profiling/test/ProfilingMocks.hpp index 2cd44c40a2..28e410fb9a 100644 --- a/src/profiling/test/ProfilingMocks.hpp +++ b/src/profiling/test/ProfilingMocks.hpp @@ -111,12 +111,12 @@ public: if(packetInfo.second != 0) { - return std::count(m_WrittenData.begin(), m_WrittenData.end(), packetInfo); + return static_cast(std::count(m_WrittenData.begin(), m_WrittenData.end(), packetInfo)); } else { - return std::count_if(m_WrittenData.begin(), m_WrittenData.end(), - [&packetInfo](const std::pair pair) { return packetInfo.first == pair.first; }); + return static_cast(std::count_if(m_WrittenData.begin(), m_WrittenData.end(), + [&packetInfo](const std::pair pair) { return packetInfo.first == pair.first; })); } } @@ -142,7 +142,7 @@ public: { std::lock_guard lock(m_Mutex); - return m_WrittenData.size(); + return static_cast(m_WrittenData.size()); } void Clear() -- cgit v1.2.1