From 375c64752c8cdce8dbc906c5134c97da63f1158c Mon Sep 17 00:00:00 2001 From: Peter Repukat Date: Fri, 12 Nov 2021 13:34:45 +0100 Subject: [PATCH] Catch expectiony by reference --- GlosSITarget/SteamTarget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GlosSITarget/SteamTarget.cpp b/GlosSITarget/SteamTarget.cpp index 10c5933..ba11465 100644 --- a/GlosSITarget/SteamTarget.cpp +++ b/GlosSITarget/SteamTarget.cpp @@ -195,7 +195,7 @@ std::filesystem::path SteamTarget::getSteamPath() const const auto res = key.GetStringValue(L"SteamPath"); spdlog::info(L"Detected Steam Path: {}", res); return res; - } catch (winreg::RegException e) { + } catch (const winreg::RegException& e) { spdlog::error("Couldn't get Steam path from Registry; {}", e.what()); } return L""; @@ -215,7 +215,7 @@ std::wstring SteamTarget::getSteamUserId() const spdlog::info(L"Detected Steam UserId: {}", res); return res; } - catch (winreg::RegException e) { + catch (const winreg::RegException& e) { spdlog::error("Couldn't get Steam path from Registry; {}", e.what()); } return L"";