summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-19 15:11:35 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-19 15:11:55 +0100
commit555aa034fd870436ff0168642ea22428962ec73c (patch)
tree00c2feac0b15f916e8b2eddc65a8930ce036fc11 /include
parent635c016b64a6858227016e4e67d3d26f9cc7e224 (diff)
feat: parser.hpp: Use [[nodiscard]] in `operator[]`.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/ocl/fix/checksum.hpp2
-rw-r--r--include/ocl/fix/parser.hpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/include/ocl/fix/checksum.hpp b/include/ocl/fix/checksum.hpp
index f124a08..592d33d 100644
--- a/include/ocl/fix/checksum.hpp
+++ b/include/ocl/fix/checksum.hpp
@@ -14,4 +14,4 @@ namespace ocl::fix
{
}
-#endif \ No newline at end of file
+#endif \ No newline at end of file
diff --git a/include/ocl/fix/parser.hpp b/include/ocl/fix/parser.hpp
index 3074cf7..41d3638 100644
--- a/include/ocl/fix/parser.hpp
+++ b/include/ocl/fix/parser.hpp
@@ -19,7 +19,7 @@ namespace ocl::fix
/// @brief Buffer+Length structure
using range_ptr_type = range*;
- using range_type = range;
+ using range_type = range;
using tag_type = std::string;
using value_type = std::string;
@@ -74,6 +74,7 @@ namespace ocl::fix
range_buffer& operator=(const range_buffer&) = default;
range_buffer(const range_buffer&) = default;
+ [[nodiscard("please use the returned value of the tag.")]]
value_type operator[](const tag_type& key)
{
if (key.empty())
@@ -161,4 +162,4 @@ namespace ocl::fix
};
} // namespace ocl::fix
-#endif // ifndef __OCL_FIX_PARSER \ No newline at end of file
+#endif // ifndef __OCL_FIX_PARSER