Change variable being shadowed

apperror was shadowing another variable in the scope outside of the if
statement, leading to a warning.

Adding an underscore changes the var name without changing the meaning.
In the future a different structure should probably be chosen for the
statements.
This commit is contained in:
Vasily
2018-12-27 00:29:08 +01:00
parent 6d3b5fdf63
commit 629c956618
+2 -2
View File
@@ -58,8 +58,8 @@ void installManifest(bool cleaninstall = false) {
if (apperror != vr::VRApplicationError_None) {
throw std::runtime_error(std::string("Could not add application manifest: ") + std::string(vr::VRApplications()->GetApplicationsErrorNameFromEnum(apperror)));
} else if (!alreadyInstalled || cleaninstall) {
auto apperror = vr::VRApplications()->SetApplicationAutoLaunch(advsettings::OverlayController::applicationKey, true);
if (apperror != vr::VRApplicationError_None) {
auto app_error = vr::VRApplications()->SetApplicationAutoLaunch(advsettings::OverlayController::applicationKey, true);
if (app_error != vr::VRApplicationError_None) {
throw std::runtime_error(std::string("Could not set auto start: ") + std::string(vr::VRApplications()->GetApplicationsErrorNameFromEnum(apperror)));
}
}