Refactor is_positive_num() to use C-strings

This makes the future move to C easier, as well as just shows that it's
plain unnecessary to use an std::string here.
This commit is contained in:
Misa
2021-02-11 16:36:22 -08:00
committed by Ethan Lee
parent 825dbac228
commit 89bddf98b6
3 changed files with 4 additions and 4 deletions

View File

@@ -162,7 +162,7 @@ std::string find_tag(const std::string& buf, const std::string& start, const std
size_t real_start = start_pos + 2 + ((int) hex);
std::string number(value.substr(real_start, end - real_start));
if (!is_positive_num(number, hex))
if (!is_positive_num(number.c_str(), hex))
{
return "";
}