From 47a1650c4810ad3cb3e9f125cb0addf18aa7395c Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 18 Nov 2024 23:53:38 +0000 Subject: miscfunctions: move configStringToInt to std::expected --- src/debug/HyprCtl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/debug/HyprCtl.cpp') diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 1b94296f..4d3c2be4 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -1286,7 +1286,7 @@ std::string dispatchSeterror(eHyprCtlOutputFormat format, std::string request) { return "ok"; } - const CColor COLOR = configStringToInt(vars[1]); + const CColor COLOR = configStringToInt(vars[1]).value_or(0); for (size_t i = 2; i < vars.size(); ++i) errorMessage += vars[i] + ' '; @@ -1539,7 +1539,7 @@ std::string dispatchNotify(eHyprCtlOutputFormat format, std::string request) { time = std::stoi(TIME); } catch (std::exception& e) { return "invalid arg 2"; } - CColor color = configStringToInt(vars[3]); + CColor color = configStringToInt(vars[3]).value_or(0); size_t msgidx = 4; float fontsize = 13.f; -- cgit v1.2.3