2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-08 05:25:51 +00:00

Merge pull request #31 from lioncash/empty

CVar: Use std::string::empty where applicable
This commit is contained in:
Phillip Stephens 2019-10-20 18:34:39 -07:00 committed by GitHub
commit 0feffbdbb7

View File

@ -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 {