From 149528e88c081e71fc7ec78e0c301eb2e487adfc Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Thu, 5 Sep 2019 12:02:04 +0100 Subject: IVGCVSW-3691 Basic refactoring in view of upcoming work in the profiler Change-Id: Iea4550b864fc2adb04a3a2411a7ead06b1f60ab9 Signed-off-by: Matteo Martincigh --- src/profiling/ProfilingUtils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/profiling/ProfilingUtils.cpp') diff --git a/src/profiling/ProfilingUtils.cpp b/src/profiling/ProfilingUtils.cpp index 86abef17b3..015a66ed93 100644 --- a/src/profiling/ProfilingUtils.cpp +++ b/src/profiling/ProfilingUtils.cpp @@ -35,7 +35,7 @@ void WriteUint32(unsigned char* buffer, unsigned int offset, uint32_t value) { BOOST_ASSERT(buffer); - buffer[offset] = static_cast(value & 0xFF); + buffer[offset] = static_cast(value & 0xFF); buffer[offset + 1] = static_cast((value >> 8) & 0xFF); buffer[offset + 2] = static_cast((value >> 16) & 0xFF); buffer[offset + 3] = static_cast((value >> 24) & 0xFF); @@ -43,9 +43,9 @@ void WriteUint32(unsigned char* buffer, unsigned int offset, uint32_t value) void WriteUint16(unsigned char* buffer, unsigned int offset, uint16_t value) { - BOOST_ASSERT(buffer != nullptr); + BOOST_ASSERT(buffer); - buffer[offset] = static_cast(value & 0xFF); + buffer[offset] = static_cast(value & 0xFF); buffer[offset + 1] = static_cast((value >> 8) & 0xFF); } @@ -71,7 +71,7 @@ uint32_t ReadUint32(const unsigned char* buffer, unsigned int offset) BOOST_ASSERT(buffer); uint32_t value = 0; - value = static_cast(buffer[offset]); + value = static_cast(buffer[offset]); value |= static_cast(buffer[offset + 1]) << 8; value |= static_cast(buffer[offset + 2]) << 16; value |= static_cast(buffer[offset + 3]) << 24; @@ -83,7 +83,7 @@ uint16_t ReadUint16(const unsigned char* buffer, unsigned int offset) BOOST_ASSERT(buffer); uint32_t value = 0; - value = static_cast(buffer[offset]); + value = static_cast(buffer[offset]); value |= static_cast(buffer[offset + 1]) << 8; return static_cast(value); } @@ -115,4 +115,4 @@ std::string GetProcessName() } // namespace profiling -} // namespace armnn \ No newline at end of file +} // namespace armnn -- cgit v1.2.1