From 3009cdd9517185ffd7a0e9b048b847c0e1c7b9ac Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 16 Nov 2024 21:50:04 +0000 Subject: [PATCH] Tidying --- src/Targets/TargetMemoryCache.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Targets/TargetMemoryCache.hpp b/src/Targets/TargetMemoryCache.hpp index eefa6267..6f7d1833 100644 --- a/src/Targets/TargetMemoryCache.hpp +++ b/src/Targets/TargetMemoryCache.hpp @@ -11,7 +11,7 @@ namespace Targets class TargetMemoryCache { public: - TargetMemoryCache(const TargetMemorySegmentDescriptor& memorySegmentDescriptor); + explicit TargetMemoryCache(const TargetMemorySegmentDescriptor& memorySegmentDescriptor); /** * Fetches data from the cache. @@ -21,7 +21,7 @@ namespace Targets * * @return */ - TargetMemoryBuffer fetch(TargetMemoryAddress startAddress, TargetMemorySize bytes) const; + [[nodiscard]] TargetMemoryBuffer fetch(TargetMemoryAddress startAddress, TargetMemorySize bytes) const; /** * Checks if the cache currently holds data within the given address range. @@ -31,7 +31,7 @@ namespace Targets * * @return */ - bool contains(TargetMemoryAddress startAddress, TargetMemorySize bytes) const; + [[nodiscard]] bool contains(TargetMemoryAddress startAddress, TargetMemorySize bytes) const; /** * Inserts data into the cache and performs any necessary bookkeeping. @@ -68,6 +68,6 @@ namespace Targets * An iterator to the intersecting segment, or populatedSegments::end() if none is found. */ using SegmentIt = decltype(TargetMemoryCache::populatedSegments)::const_iterator; - SegmentIt intersectingSegment(TargetMemoryAddress address) const; + [[nodiscard]] SegmentIt intersectingSegment(TargetMemoryAddress address) const; }; }