From 7e8f86a808705395402b7ce61a27a30032f09f4f Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 27 Jul 2020 16:40:48 +0200 Subject: [PATCH] fix code-style --- common/lib/memory.cpp | 2 +- common/lib/memory_manager.cpp | 2 +- common/lib/tool.cpp | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/lib/memory.cpp b/common/lib/memory.cpp index c58235540..e7d20e337 100644 --- a/common/lib/memory.cpp +++ b/common/lib/memory.cpp @@ -233,7 +233,7 @@ HostDmaRam::HostDmaRamAllocator::~HostDmaRamAllocator() try { auto translation = mm.getTranslationFromProcess(getAddrSpaceId()); baseVirt = reinterpret_cast(translation.getLocalAddr(0)); - } catch(const std::out_of_range&) { + } catch (const std::out_of_range&) { /* Not mapped, nothing to do */ return; } diff --git a/common/lib/memory_manager.cpp b/common/lib/memory_manager.cpp index a45357379..6c9369aa0 100644 --- a/common/lib/memory_manager.cpp +++ b/common/lib/memory_manager.cpp @@ -167,7 +167,7 @@ MemoryManager::pathCheck(const MemoryGraph::Path &path) auto mapping = memoryGraph.getEdge(mappingId); try { translation += getTranslationFromMapping(*mapping); - } catch(const InvalidTranslation&) { + } catch (const InvalidTranslation&) { return false; } } diff --git a/common/lib/tool.cpp b/common/lib/tool.cpp index a511132ec..7c7bd4f60 100644 --- a/common/lib/tool.cpp +++ b/common/lib/tool.cpp @@ -79,8 +79,7 @@ int Tool::run() logger->info(CLR_GRN("Goodbye!")); return ret; - } - catch (std::runtime_error &e) { + } catch (const std::runtime_error &e) { logger->error("{}", e.what()); return -1;