From 85b4b561bf34ff1e3cf556e05355946ab83d1d09 Mon Sep 17 00:00:00 2001 From: gibbed Date: Sun, 4 Aug 2019 02:52:28 -0500 Subject: [PATCH] [Base] Fix Travis complaints with cvar code. --- src/xenia/base/cvar.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/xenia/base/cvar.h b/src/xenia/base/cvar.h index a4c8c5d9b..deeec67f0 100644 --- a/src/xenia/base/cvar.h +++ b/src/xenia/base/cvar.h @@ -87,7 +87,8 @@ void CommandVar::AddToLaunchOptions(cxxopts::Options* options) { } template void ConfigVar::AddToLaunchOptions(cxxopts::Options* options) { - options->add_options(category_)(name_, description_, cxxopts::value()); + options->add_options(category_)(this->name_, this->description_, + cxxopts::value()); } template void CommandVar::LoadFromLaunchOptions(cxxopts::ParseResult* result) { @@ -125,10 +126,12 @@ void CommandVar::UpdateValue() { } template void ConfigVar::UpdateValue() { - if (commandline_value_) return SetValue(*commandline_value_); - if (game_config_value_) return SetValue(*game_config_value_); - if (config_value_) return SetValue(*config_value_); - return SetValue(default_value_); + if (this->commandline_value_) { + return this->SetValue(*this->commandline_value_); + } + if (game_config_value_) return this->SetValue(*game_config_value_); + if (config_value_) return this->SetValue(*config_value_); + return this->SetValue(this->default_value_); } template T CommandVar::Convert(std::string val) { @@ -167,8 +170,8 @@ bool ConfigVar::is_transient() const { } template std::string ConfigVar::config_value() const { - if (config_value_) return ToString(*config_value_); - return ToString(default_value_); + if (config_value_) return this->ToString(*config_value_); + return this->ToString(this->default_value_); } template void CommandVar::SetCommandLineValue(const T val) {