refactor: split tr_parseNum inout var into two vars (#3748)

build: re-enable cert-err34-c warning
This commit is contained in:
Charles Kerr
2022-09-02 01:04:09 -05:00
committed by GitHub
parent 6d721fe32f
commit 1062ae8f1f
8 changed files with 54 additions and 53 deletions

View File

@@ -87,10 +87,10 @@ constexpr auto tr_saveFile(std::string_view filename, ContiguousRange const& x,
void tr_wait_msec(long int delay_milliseconds);
template<typename T, std::enable_if_t<std::is_integral<T>::value, bool> = true>
[[nodiscard]] std::optional<T> tr_parseNum(std::string_view& sv, int base = 10);
[[nodiscard]] std::optional<T> tr_parseNum(std::string_view str, std::string_view* setme_remainder = nullptr, int base = 10);
template<typename T, std::enable_if_t<std::is_floating_point<T>::value, bool> = true>
[[nodiscard]] std::optional<T> tr_parseNum(std::string_view& sv);
[[nodiscard]] std::optional<T> tr_parseNum(std::string_view str, std::string_view* setme_remainder = nullptr);
#ifdef _WIN32