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:
+2
-2
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user