aboutsummaryrefslogtreecommitdiff
path: root/src/layer_context.cc
diff options
context:
space:
mode:
authorNicolas James <nj3ahxac@gmail.com>2026-04-07 13:43:50 +1000
committerNicolas James <nj3ahxac@gmail.com>2026-04-07 13:43:50 +1000
commitce26014c2e6a0200ea90eac8ec87881a0d55e727 (patch)
tree7fe1360097b8814188e70de570faac2edee80840 /src/layer_context.cc
parenta65bdd8a0aa027c97391cea807d6d30df1c22ca4 (diff)
Remove dead code, upgrade env bools to const
Diffstat (limited to 'src/layer_context.cc')
-rw-r--r--src/layer_context.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/layer_context.cc b/src/layer_context.cc
index 93f4a26..120d52e 100644
--- a/src/layer_context.cc
+++ b/src/layer_context.cc
@@ -5,16 +5,15 @@
namespace low_latency {
-LayerContext::LayerContext() {
- const auto parse_bool_env = [](const auto& name) -> bool {
- const auto env = std::getenv(name);
- return env && std::string_view{env} == "1";
- };
-
- this->should_expose_reflex = parse_bool_env(EXPOSE_REFLEX_ENV);
- this->should_spoof_nvidia = parse_bool_env(SPOOF_NVIDIA_ENV);
+static bool parse_bool_env(const auto& name) {
+ const auto env = std::getenv(name);
+ return env && std::string_view{env} == "1";
}
+LayerContext::LayerContext()
+ : should_expose_reflex(parse_bool_env(EXPOSE_REFLEX_ENV)),
+ should_spoof_nvidia(parse_bool_env(SPOOF_NVIDIA_ENV)) {}
+
LayerContext::~LayerContext() {}
} // namespace low_latency \ No newline at end of file