From 20748b34ad43f69ec127a4caab05196e2fd38705 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 24 Nov 2025 12:08:44 -0500 Subject: hotpatch: urgent patches in shell scripts and library. Signed-off-by: Amlal El Mahrouss --- include/ocl/core/chunk_string.hpp | 11 ++++++----- include/ocl/core/config.hpp | 27 +++++++++++++++++++++++++++ include/ocl/core/includes.hpp | 27 --------------------------- 3 files changed, 33 insertions(+), 32 deletions(-) create mode 100644 include/ocl/core/config.hpp delete mode 100644 include/ocl/core/includes.hpp (limited to 'include') diff --git a/include/ocl/core/chunk_string.hpp b/include/ocl/core/chunk_string.hpp index ccbc10a..c60b0a4 100644 --- a/include/ocl/core/chunk_string.hpp +++ b/include/ocl/core/chunk_string.hpp @@ -20,14 +20,17 @@ namespace ocl template class basic_chunk_string final { + public: + using condition_type = bool; + private: char_type packed_chunks_[max_chunk_size] = {0}; std::size_t chunk_total_{}; - bool bad_{false}; + condition_type bad_{false}; public: - const bool& bad{bad_}; + const condition_type& bad{bad_}; basic_chunk_string() = default; @@ -53,9 +56,7 @@ namespace ocl if (in == nullptr || bad_) return *this; - const auto& sz = std::strlen(in); - - this->operator+=(std::basic_string(in, sz)); + this->operator+=(std::basic_string(in)); return *this; } diff --git a/include/ocl/core/config.hpp b/include/ocl/core/config.hpp new file mode 100644 index 0000000..2ea1399 --- /dev/null +++ b/include/ocl/core/config.hpp @@ -0,0 +1,27 @@ +/* + * File: core/config.hpp + * Purpose: Config file of the OCL. + * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace ocl +{ +#ifdef OCL_USE_UTF8 + using char_type = char8_t; +#else + using char_type = char; +#endif +} // namespace ocl \ No newline at end of file diff --git a/include/ocl/core/includes.hpp b/include/ocl/core/includes.hpp deleted file mode 100644 index 8d94cc0..0000000 --- a/include/ocl/core/includes.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * File: core/config.hpp - * Purpose: Config file of the OCL. - * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. - */ - -#pragma once - -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace ocl -{ -#ifdef OCL_USE_UTF8 - using char_type = char8_t; -#else - using char_type = char; -#endif -} // namespace ocl \ No newline at end of file -- cgit v1.2.3