From 87ffc103069b7baaaa7fa528805fbb05c1b55bb3 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 14 Dec 2024 02:09:39 +0000 Subject: [PATCH] Tidying --- src/Services/StringService.cpp | 2 +- src/Services/StringService.hpp | 3 ++- src/Targets/TargetAddressSpaceDescriptor.hpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Services/StringService.cpp b/src/Services/StringService.cpp index 31106e08..3f7bdb58 100644 --- a/src/Services/StringService.cpp +++ b/src/Services/StringService.cpp @@ -82,7 +82,7 @@ namespace Services return stream.str(); } - std::string StringService::toHex(const std::vector& data) { + std::string StringService::toHex(std::span data) { auto stream = std::stringstream{}; stream << std::hex << std::setfill('0'); diff --git a/src/Services/StringService.hpp b/src/Services/StringService.hpp index 36b21d54..a3eca698 100644 --- a/src/Services/StringService.hpp +++ b/src/Services/StringService.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -25,7 +26,7 @@ namespace Services static std::string toHex(std::uint32_t value); static std::string toHex(std::uint16_t value); static std::string toHex(unsigned char value); - static std::string toHex(const std::vector& data); + static std::string toHex(std::span data); static std::string toHex(std::string_view data); template diff --git a/src/Targets/TargetAddressSpaceDescriptor.hpp b/src/Targets/TargetAddressSpaceDescriptor.hpp index 0e1e9545..46c3e4d0 100644 --- a/src/Targets/TargetAddressSpaceDescriptor.hpp +++ b/src/Targets/TargetAddressSpaceDescriptor.hpp @@ -52,7 +52,7 @@ namespace Targets bool operator == (const TargetAddressSpaceDescriptor& other) const; bool operator != (const TargetAddressSpaceDescriptor& other) const; - TargetMemorySize size() const; + [[nodiscard]] TargetMemorySize size() const; /** * Attempts to fetch a memory segment descriptor with the given key.