Remove noexcept from util::tokenize_string

One instance of this method is noexcept and one isn't. The version
that is noexcept uses std::vector::emplace_back, which may throw
exceptions. Instead of adding a try/catch block, opt for just making
the two functions able to throw exceptions.

This fixes a clang-tidy bugprone-exception-escape warning.
This commit is contained in:
Tim Wojtulewicz 2025-04-16 11:47:20 -07:00
parent dbecfb5a2a
commit bdb0fad6d5
2 changed files with 2 additions and 2 deletions

View file

@ -1763,7 +1763,7 @@ vector<string>* tokenize_string(std::string_view input, std::string_view delim,
return rval;
}
vector<std::string_view> tokenize_string(std::string_view input, const char delim) noexcept {
vector<std::string_view> tokenize_string(std::string_view input, const char delim) {
vector<std::string_view> rval;
size_t pos = 0;