From 342a8ba08a67fcbc6f179c32118ca2035002698d Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Wed, 2 Oct 2019 17:12:18 +0100 Subject: Throw by value, catch by const reference. Even anonymously. This avoids compiler warnings about catching polymorphic types by value. Change-Id: I672bcffe3471fcc0c446bab1e554937ba09208b2 Signed-off-by: Matthew Bentham --- src/profiling/CommandThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/profiling') diff --git a/src/profiling/CommandThread.cpp b/src/profiling/CommandThread.cpp index 4cd622c477..bd4aa96c7c 100644 --- a/src/profiling/CommandThread.cpp +++ b/src/profiling/CommandThread.cpp @@ -37,7 +37,7 @@ void CommandThread::WaitForPacket() m_CommandHandlerRegistry.GetFunctor(packet.GetPacketId(), version.GetEncodedValue()); commandHandlerFunctor->operator()(packet); } - catch(armnn::TimeoutException) + catch(const armnn::TimeoutException&) { if(m_StopAfterTimeout) { @@ -94,4 +94,4 @@ bool CommandThread::StopAfterTimeout(bool stopAfterTimeout) }//namespace profiling -}//namespace armnn \ No newline at end of file +}//namespace armnn -- cgit v1.2.1