chore: Use TryParse for LDF parsing (#1206)

* LDF: Simplify parsing

* Update GeneralUtils.h
This commit is contained in:
David Markowitz
2023-10-09 13:22:40 -07:00
committed by GitHub
parent 570c597148
commit 3dd2791066
3 changed files with 24 additions and 27 deletions

View File

@@ -126,6 +126,11 @@ namespace GeneralUtils {
template <typename T>
T Parse(const char* value);
template <>
inline bool Parse(const char* value) {
return std::stoi(value);
}
template <>
inline int32_t Parse(const char* value) {
return std::stoi(value);