summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-09 02:33:57 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-09 02:33:57 +0100
commitd00417533e197bc33faa4a14602e098a94f5a955 (patch)
tree5c13849af857197ae6be936942a22d237db5d2b6
parent7b7c482846befb1fd7b01e2edc372e0faf45f825 (diff)
chore: codebase cleanup.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--examples/.keep0
-rw-r--r--examples/hash_crc32_example/CMakeLists.txt15
-rw-r--r--examples/hash_crc32_example/example.cc14
-rw-r--r--examples/simple_unique_socket/CMakeLists.txt15
-rw-r--r--examples/simple_unique_socket/example.cc22
-rw-r--r--include/ocl/fix/parser.hpp11
-rw-r--r--tests/.gitkeep0
7 files changed, 6 insertions, 71 deletions
diff --git a/examples/.keep b/examples/.keep
deleted file mode 100644
index e69de29..0000000
--- a/examples/.keep
+++ /dev/null
diff --git a/examples/hash_crc32_example/CMakeLists.txt b/examples/hash_crc32_example/CMakeLists.txt
deleted file mode 100644
index 9758bfa..0000000
--- a/examples/hash_crc32_example/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-
-cmake_minimum_required(VERSION 3.15...3.31)
-
-project(
- HashExample
- VERSION 1.0
- LANGUAGES CXX)
-
-find_package(Boost REQUIRED COMPONENTS container)
-
-add_executable(HashExample example.cc)
-
-set_property(TARGET HashExample PROPERTY CXX_STANDARD 20)
-target_include_directories(HashExample PUBLIC ../../include/ocl)
-target_link_libraries(HashExample PRIVATE Boost::container)
diff --git a/examples/hash_crc32_example/example.cc b/examples/hash_crc32_example/example.cc
deleted file mode 100644
index bd27662..0000000
--- a/examples/hash_crc32_example/example.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <ocl/crc_hash.hpp>
-#include <ocl/print.hpp>
-
-int main(int argc, char** argv)
-{
- if (argc != 2) return 1;
-
- std::hash<ocl::crc_hash_trait> hash{};
-
- ocl::io::enable_stdio_sync(false);
- ocl::io::print(hash(argv[1]));
-
- return 0;
-}
diff --git a/examples/simple_unique_socket/CMakeLists.txt b/examples/simple_unique_socket/CMakeLists.txt
deleted file mode 100644
index 2cf3648..0000000
--- a/examples/simple_unique_socket/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-
-cmake_minimum_required(VERSION 3.15...3.31)
-
-project(
- NetworkExample
- VERSION 1.0
- LANGUAGES CXX)
-
-find_package(Boost REQUIRED COMPONENTS container)
-
-add_executable(NetworkExample example.cc)
-
-set_property(TARGET NetworkExample PROPERTY CXX_STANDARD 20)
-target_include_directories(NetworkExample PUBLIC ../../include/ocl)
-target_link_libraries(NetworkExample PRIVATE Boost::container)
diff --git a/examples/simple_unique_socket/example.cc b/examples/simple_unique_socket/example.cc
deleted file mode 100644
index b5bd34f..0000000
--- a/examples/simple_unique_socket/example.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <ocl/unique_socket.hpp>
-#include <ocl/print.hpp>
-
-/// @brief Basic Send test
-int main()
-{
- ocl::unique_socket sock = ocl::unique_socket::make_socket<8005>(ocl::unique_socket::any_address, true);
-
- char buf_dst[512] = {"HELLO, WORLD\0"};
-
- ocl::unique_socket sock2 = ocl::unique_socket::make_socket<8005>(ocl::unique_socket::any_address, false);
-
- char buf_dst2[512] = {0};
-
- auto new_sock = sock.accept();
- new_sock.write_from_buffer(buf_dst, strlen(buf_dst));
- sock2.read_client_buffer(buf_dst2, strlen(buf_dst));
- std::cout << "result:" << buf_dst2 << "\n";
-
-
- return EXIT_SUCCESS;
-}
diff --git a/include/ocl/fix/parser.hpp b/include/ocl/fix/parser.hpp
index 139f171..985fda8 100644
--- a/include/ocl/fix/parser.hpp
+++ b/include/ocl/fix/parser.hpp
@@ -87,7 +87,8 @@ namespace ocl::fix
bool is_valid()
{
- return this->operator[]("8").empty() == false;
+ constexpr auto magic_tag = "8";
+ return this->operator[](magic_tag).empty() == false;
}
explicit operator bool()
@@ -103,20 +104,20 @@ namespace ocl::fix
/// AMLALE: Yeah...
static constexpr const int soh = '\x01';
static constexpr const char eq = '=';
- static constexpr uint32_t base = 10U;
+ static constexpr unsigned base = 10U;
explicit visitor() = default;
~visitor() = default;
- visitor& operator=(const visitor&) = default;
- visitor(const visitor&) = default;
+ visitor& operator=(const visitor&) = delete;
+ visitor(const visitor&) = delete;
range_buffer operator()(const std::string& in)
{
return this->visit(in);
}
- /// @brief Visit a FIX message and parse it into a range_buffer object.
+ /// @brief Visits a FIX message and parse it into a range_buffer object.
/// @param in The input FIX message as a string.
/// @warning This function may throw exceptions.
range_buffer visit(const std::string& in)
diff --git a/tests/.gitkeep b/tests/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/tests/.gitkeep
+++ /dev/null