mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-10-22 07:02:37 +00:00
Simplify string access
This commit is contained in:
1 parent
7f18eacced
commit
55c7afd25f
2 files changed
+2
-1
No files matched your search
@@ -21,4 +21,5 @@ public:
|
||||
[[nodiscard]] auto operator[](size_t idx) const noexcept { return at(idx); }
|
||||
|
||||
[[nodiscard]] auto integer_at(size_t idx) const noexcept { return int64_t(at(idx)); }
|
||||
[[nodiscard]] auto string_at(size_t idx) const noexcept { return at(idx).get_string(); }
|
||||
};
|
||||
@@ -11,5 +11,5 @@ public:
|
||||
cycle_t(const simdjson::dom::array input) noexcept
|
||||
: byte_t(input) {}
|
||||
|
||||
[[nodiscard]] auto action() const noexcept { return at(2).get_string(); }
|
||||
[[nodiscard]] auto action() const noexcept { return string_at(2); }
|
||||
};
|
||||
Reference in new issue
Block a user