From f8a57993276fbaa6c7c5c4f737d015c0aa0b4d2e Mon Sep 17 00:00:00 2001 From: cat Date: Wed, 28 Jan 2026 01:13:53 +0200 Subject: [PATCH] Added nodiscard to dualkey map query --- headers/Containers/DualkeyMap.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/headers/Containers/DualkeyMap.hpp b/headers/Containers/DualkeyMap.hpp index a64f09d..2046536 100644 --- a/headers/Containers/DualkeyMap.hpp +++ b/headers/Containers/DualkeyMap.hpp @@ -38,7 +38,6 @@ public: } } - // Insertion void Insert(AKey firstKey, BKey secondKey, Value value) { std::size_t firstKeyHash = std::hash{}(firstKey); std::size_t secondKeyHash = std::hash{}(secondKey); @@ -47,7 +46,7 @@ public: std::move(value))); } - // Indexing + [[nodiscard("Discarding an expensive operation's result!")]] std::vector Query(std::optional firstKey, std::optional secondKey) { bool isFirstKeyGiven = firstKey.has_value();