diff options
| author | Amlal <amlal@nekernel.org> | 2025-08-11 13:03:40 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-08-11 13:03:40 +0200 |
| commit | 1d9328259052be88b86b958fdb1b2396307cacdb (patch) | |
| tree | b179c777d9b832ebdfcb7e5e4a4fae02b9b8fd5f /dev/lib/fix | |
| parent | 87f10dad540971c4aa22d892c676dce590ca189a (diff) | |
feat: SOCL modem improvements and newly added is_valid method to modem.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/lib/fix')
| -rw-r--r-- | dev/lib/fix/parser.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dev/lib/fix/parser.hpp b/dev/lib/fix/parser.hpp index f0f7141..1095e8d 100644 --- a/dev/lib/fix/parser.hpp +++ b/dev/lib/fix/parser.hpp @@ -21,7 +21,7 @@ namespace snu::fix { template <typename char_type> - struct basic_visitor; + class basic_visitor; template <typename char_type> struct basic_range; @@ -63,12 +63,12 @@ namespace snu::fix char_type* bytes_; size_t length_; - bool is_valid() + bool is_valid() noexcept { return this->bytes_ && this->length_ > 0; } - operator bool() + explicit operator bool() { return this->is_valid(); } @@ -77,7 +77,7 @@ namespace snu::fix /// @brief Convert basic_range to usable string. /// @note This function assumes that the basic_range is valid and contains ASCII bytes. template <typename char_type = char> - inline std::basic_string<char_type> to_string(basic_range<char_type>& basic_range) noexcept + std::basic_string<char_type> to_string(basic_range<char_type>& basic_range) noexcept { if (basic_range.length_ < 0) return std::basic_string<char_type>{}; @@ -126,7 +126,7 @@ namespace snu::fix return magic_.starts_with(basic_range_data<char_type>::begin); } - operator bool() + explicit operator bool() { return this->is_valid(); } |
