From 67ef2a52c3cdcc37538d77711bbcea2f0e5655e5 Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Thu, 10 Oct 2019 13:29:02 +0100 Subject: IVGCVSW-3964 Change the type held by the Packet class to unsigned char * Updated the Packet class * Updated the pertinent code accordingly Signed-off-by: Matteo Martincigh Change-Id: I73eab5b1ead67a610cd17fd33f8a74f764ad8cc4 --- src/profiling/ProfilingConnectionDumpToFileDecorator.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/profiling/ProfilingConnectionDumpToFileDecorator.cpp') diff --git a/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp b/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp index 3d4b6bf927..d7915624f6 100644 --- a/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp +++ b/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp @@ -51,7 +51,7 @@ bool ProfilingConnectionDumpToFileDecorator::WritePacket(const unsigned char* bu bool success = true; if (m_Settings.m_DumpOutgoing) { - success &= DumpOutgoingToFile(reinterpret_cast(buffer), length); + success &= DumpOutgoingToFile(buffer, length); } success &= m_Connection->WritePacket(buffer, length); return success; @@ -105,7 +105,8 @@ void ProfilingConnectionDumpToFileDecorator::DumpIncomingToFile(const Packet& pa m_IncomingDumpFileStream.write(reinterpret_cast(&header), sizeof header); m_IncomingDumpFileStream.write(reinterpret_cast(&packetLength), sizeof packetLength); - m_IncomingDumpFileStream.write(packet.GetData(), boost::numeric_cast(packetLength)); + m_IncomingDumpFileStream.write(reinterpret_cast(packet.GetData()), + boost::numeric_cast(packetLength)); success &= m_IncomingDumpFileStream.good(); if (!(success || m_Settings.m_IgnoreFileErrors)) @@ -122,7 +123,7 @@ void ProfilingConnectionDumpToFileDecorator::DumpIncomingToFile(const Packet& pa /// @param buffer pointer to data to write /// @param length number of bytes to write /// @return true if write successful, false otherwise -bool ProfilingConnectionDumpToFileDecorator::DumpOutgoingToFile(const char* buffer, uint32_t length) +bool ProfilingConnectionDumpToFileDecorator::DumpOutgoingToFile(const unsigned char* buffer, uint32_t length) { bool success = true; if (!m_OutgoingDumpFileStream.is_open()) @@ -136,7 +137,8 @@ bool ProfilingConnectionDumpToFileDecorator::DumpOutgoingToFile(const char* buff } // attempt to write binary data - m_OutgoingDumpFileStream.write(buffer, boost::numeric_cast(length)); + m_OutgoingDumpFileStream.write(reinterpret_cast(buffer), + boost::numeric_cast(length)); success &= m_OutgoingDumpFileStream.good(); if (!(success || m_Settings.m_IgnoreFileErrors)) { -- cgit v1.2.1