abstract: Assign default to value

Fix `-Wmaybe-uninitialized` on line 43 and 44.
This commit is contained in:
Krystine Sherwin 2025-03-20 17:19:22 +13:00
parent f92ad7d900
commit 452dd1b74b
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ struct Slice {
}
static int parse_index(const char *begin, const char *end, const std::string &slice) {
int value;
int value = 0;
auto result = std::from_chars(begin, end, value, 10);
if (result.ptr != end || result.ptr == begin)
syntax_error(slice);