From 1907168452dd4d308833e2a119025a30e33eb783 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Mon, 8 Apr 2024 17:43:22 -0500 Subject: [PATCH] config_passthrough.cpp --- src/config_passthrough.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/config_passthrough.cpp b/src/config_passthrough.cpp index f902a134..dacdfb4c 100644 --- a/src/config_passthrough.cpp +++ b/src/config_passthrough.cpp @@ -31,16 +31,7 @@ template<> int Passthrough::from_string(const std::string &s_) { - if(s_ == "off") - _data = Passthrough::ENUM::OFF; - ef(s_ == "ro") - _data = Passthrough::ENUM::RO; - ef(s_ == "wo") - _data = Passthrough::ENUM::WO; - ef(s_ == "rw") - _data = Passthrough::ENUM::RW; - else - return -EINVAL; + _data = PassthroughEnum::_from_string_nothrow(s_); return 0; }