mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 21:33:59 +00:00
[core] Use constexpr when possible
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -143,7 +143,7 @@ bool EatVersion(string & s, uint32_t & version)
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t const kVersionLength = 6;
|
||||
size_t constexpr kVersionLength = 6;
|
||||
if (s.size() >= kVersionLength && all_of(s.begin(), s.begin() + kVersionLength, ::isdigit) &&
|
||||
(s.size() == kVersionLength || !isdigit(s[kVersionLength + 1])))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user