mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
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:
parent
dbecfb5a2a
commit
bdb0fad6d5
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue