[ox/clargs] Replace C string with StringView
All checks were successful
Build / build (push) Successful in 2m27s

This commit is contained in:
Gary Talent 2024-05-10 01:30:54 -05:00
parent 043df533b7
commit 17f28d43d1
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ bool ClArgs::getBool(ox::CRStringView arg, bool defaultValue) const noexcept {
return !err ? *value : defaultValue;
}
String ClArgs::getString(ox::CRStringView arg, const char *defaultValue) const noexcept {
String ClArgs::getString(ox::CRStringView arg, ox::StringView defaultValue) const noexcept {
auto [value, err] = m_strings.at(arg);
return !err ? ox::String(*value) : ox::String(defaultValue);
}

View File

@ -26,7 +26,7 @@ class ClArgs {
bool getBool(ox::CRStringView arg, bool defaultValue) const noexcept;
[[nodiscard]]
String getString(ox::CRStringView argName, const char *defaultValue) const noexcept;
String getString(ox::CRStringView argName, ox::StringView defaultValue) const noexcept;
[[nodiscard]]
int getInt(ox::CRStringView arg, int defaultValue) const noexcept;