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/chunk_string.hpp | |
| 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/chunk_string.hpp')
| -rw-r--r-- | include/ocl/core/chunk_string.hpp | 11 |
1 files changed, 6 insertions, 5 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; } |
