aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/SendCounterPacket.cpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-11-05 11:47:40 +0000
committerJim Flynn Arm <jim.flynn@arm.com>2019-11-05 14:27:39 +0000
commit2ffcc4179648bbd6fb08342969391a2bcd027221 (patch)
treef5d06780073bf8354a6b0195dca9961dc1f03ed5 /src/profiling/SendCounterPacket.cpp
parentb67f95796b03c1a5d3b3fa6a40f6baf85bdd09cb (diff)
downloadarmnn-2ffcc4179648bbd6fb08342969391a2bcd027221.tar.gz
IVGCVSW-4065 Refactor the IPacketBuffer smart pointers
* Added convenience "using" statement for the unique pointers to IPacketBuffer * Replaced all the occurrencies in the code Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Iffec3a425ffbc1ecb23012971563a48139eb32eb
Diffstat (limited to 'src/profiling/SendCounterPacket.cpp')
-rw-r--r--src/profiling/SendCounterPacket.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp
index dcba156e93..1ed926b6d7 100644
--- a/src/profiling/SendCounterPacket.cpp
+++ b/src/profiling/SendCounterPacket.cpp
@@ -64,7 +64,7 @@ void SendCounterPacket::SendStreamMetaDataPacket()
uint32_t offset = 0;
uint32_t reserved = 0;
- std::unique_ptr<IPacketBuffer> writeBuffer = m_BufferManager.Reserve(totalSize, reserved);
+ IPacketBufferPtr writeBuffer = m_BufferManager.Reserve(totalSize, reserved);
if (writeBuffer == nullptr || reserved < totalSize)
{
@@ -786,7 +786,7 @@ void SendCounterPacket::SendCounterDirectoryPacket(const ICounterDirectory& coun
// Reserve space in the buffer for the packet
uint32_t reserved = 0;
- std::unique_ptr<IPacketBuffer> writeBuffer = m_BufferManager.Reserve(totalSize, reserved);
+ IPacketBufferPtr writeBuffer = m_BufferManager.Reserve(totalSize, reserved);
if (writeBuffer == nullptr || reserved < totalSize)
{
@@ -823,7 +823,7 @@ void SendCounterPacket::SendPeriodicCounterCapturePacket(uint64_t timestamp, con
uint32_t offset = 0;
uint32_t reserved = 0;
- std::unique_ptr<IPacketBuffer> writeBuffer = m_BufferManager.Reserve(totalSize, reserved);
+ IPacketBufferPtr writeBuffer = m_BufferManager.Reserve(totalSize, reserved);
if (writeBuffer == nullptr || reserved < totalSize)
{
@@ -872,7 +872,7 @@ void SendCounterPacket::SendPeriodicCounterSelectionPacket(uint32_t capturePerio
uint32_t offset = 0;
uint32_t reserved = 0;
- std::unique_ptr<IPacketBuffer> writeBuffer = m_BufferManager.Reserve(totalSize, reserved);
+ IPacketBufferPtr writeBuffer = m_BufferManager.Reserve(totalSize, reserved);
if (writeBuffer == nullptr || reserved < totalSize)
{
@@ -1056,7 +1056,7 @@ void SendCounterPacket::Send(IProfilingConnection& profilingConnection)
void SendCounterPacket::FlushBuffer(IProfilingConnection& profilingConnection, bool notifyWatchers)
{
// Get the first available readable buffer
- std::unique_ptr<IPacketBuffer> packetBuffer = m_BufferManager.GetReadableBuffer();
+ IPacketBufferPtr packetBuffer = m_BufferManager.GetReadableBuffer();
// Initialize the flag that indicates whether at least a packet has been sent
bool packetsSent = false;