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

@ -338,7 +338,7 @@ inline std::string get_escaped_string(const std::string& str, bool escape_all) {
std::vector<std::string>* tokenize_string(std::string_view input, std::string_view delim,
std::vector<std::string>* rval = nullptr, int limit = 0);
std::vector<std::string_view> tokenize_string(std::string_view input, const char delim) noexcept;
std::vector<std::string_view> tokenize_string(std::string_view input, const char delim);
extern char* copy_string(const char* str, size_t len);
extern char* copy_string(const char* s);