mirror of https://github.com/AxioDL/metaforce.git
CVar: Use std::string::empty where applicable
We can use empty() instead of comparing against a default constructed new instance.
This commit is contained in:
parent
dfcad01c2f
commit
23f323b0f7
|
@ -80,8 +80,7 @@ CVar::CVar(std::string_view name, uint32_t value, std::string_view help, CVar::E
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CVar::help() const {
|
std::string CVar::help() const {
|
||||||
return std::string(m_help + (m_defaultValue != std::string() ? "\ndefault: " + m_defaultValue : "") +
|
return m_help + (m_defaultValue.empty() ? "" : "\ndefault: " + m_defaultValue) + (isReadOnly() ? " [ReadOnly]" : "");
|
||||||
(isReadOnly() ? " [ReadOnly]" : ""));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
atVec2f CVar::toVec2f(bool* isValid) const {
|
atVec2f CVar::toVec2f(bool* isValid) const {
|
||||||
|
|
Loading…
Reference in New Issue