summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-10 17:35:21 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-10 17:36:09 +0100
commit9eb0dfbff793a0def8c5da914e8386b860db99e9 (patch)
tree08b4480f1ed32aa54c57bace8f18035c996a8142
parent4990c01325e4b8871dc37a9290340e699752da74 (diff)
chore: fix redundant usage of `const` in `constexpr`.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--examples/fix_tag_example/example.cc2
-rw-r--r--include/ocl/fix/parser.hpp10
-rw-r--r--tests/fix_basic/fix_test.cc2
3 files changed, 7 insertions, 7 deletions
diff --git a/examples/fix_tag_example/example.cc b/examples/fix_tag_example/example.cc
index 37376d0..f7f3e76 100644
--- a/examples/fix_tag_example/example.cc
+++ b/examples/fix_tag_example/example.cc
@@ -1,6 +1,6 @@
#include <ocl/fix/parser.hpp>
-constexpr const char default_fix[] = {
+constexpr char default_fix[] = {
'8', '=', 'F', 'I', 'X', '.', '4', '.', '2', 0x01,
'9', '=', '6', '3', 0x01, // BodyLength = 63
'3', '5', '=', 'A', 0x01,
diff --git a/include/ocl/fix/parser.hpp b/include/ocl/fix/parser.hpp
index 985fda8..3074cf7 100644
--- a/include/ocl/fix/parser.hpp
+++ b/include/ocl/fix/parser.hpp
@@ -19,6 +19,7 @@ namespace ocl::fix
/// @brief Buffer+Length structure
using range_ptr_type = range*;
+ using range_type = range;
using tag_type = std::string;
using value_type = std::string;
@@ -87,7 +88,7 @@ namespace ocl::fix
bool is_valid()
{
- constexpr auto magic_tag = "8";
+ constexpr auto magic_tag = "8";
return this->operator[](magic_tag).empty() == false;
}
@@ -101,10 +102,9 @@ namespace ocl::fix
class visitor final
{
public:
- /// AMLALE: Yeah...
- static constexpr const int soh = '\x01';
- static constexpr const char eq = '=';
- static constexpr unsigned base = 10U;
+ static constexpr int soh = '\x01';
+ static constexpr char eq = '=';
+ static constexpr unsigned base = 10U;
explicit visitor() = default;
~visitor() = default;
diff --git a/tests/fix_basic/fix_test.cc b/tests/fix_basic/fix_test.cc
index 85b80d4..6139b12 100644
--- a/tests/fix_basic/fix_test.cc
+++ b/tests/fix_basic/fix_test.cc
@@ -8,7 +8,7 @@
#include <ocl/fix/parser.hpp>
#include <gtest/gtest.h>
-constexpr const char default_fix[] = {
+constexpr char default_fix[] = {
'8', '=', 'F', 'I', 'X', '.', '4', '.', '2', 0x01,
'9', '=', '6', '3', 0x01, // BodyLength = 63
'3', '5', '=', 'A', 0x01,