diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-24 12:09:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-24 12:09:59 -0500 |
| commit | 691492489197c9288660cccbaa8e744fd683f6b5 (patch) | |
| tree | ddca2aea7585f06d58e27004757ae758fdb655b1 /include/ocl/core | |
| parent | 0ea8adbf99d0524af96c31c6fa283d9adf483736 (diff) | |
| parent | 20748b34ad43f69ec127a4caab05196e2fd38705 (diff) | |
Merge pull request #20 from amlel-el-mahrouss/developv1.0.49
hotpatch: urgent patches in shell scripts and library.
Diffstat (limited to 'include/ocl/core')
| -rw-r--r-- | include/ocl/core/chunk_string.hpp | 11 | ||||
| -rw-r--r-- | include/ocl/core/config.hpp (renamed from include/ocl/core/includes.hpp) | 8 |
2 files changed, 10 insertions, 9 deletions
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 <typename char_type, std::size_t max_chunk_size> 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<char_type>(in, sz)); + this->operator+=(std::basic_string<char_type>(in)); return *this; } diff --git a/include/ocl/core/includes.hpp b/include/ocl/core/config.hpp index 8d94cc0..2ea1399 100644 --- a/include/ocl/core/includes.hpp +++ b/include/ocl/core/config.hpp @@ -7,16 +7,16 @@ #pragma once -#include <memory> -#include <iostream> -#include <string> - #include <boost/config.hpp> #include <boost/core/nvp.hpp> #include <boost/core/demangle.hpp> #include <boost/core/null_deleter.hpp> #include <boost/container/allocator.hpp> +#include <memory> +#include <iostream> +#include <string> + namespace ocl { #ifdef OCL_USE_UTF8 |
