From 00a5ff1c678d98af922621c275310a5e13f5e95f Mon Sep 17 00:00:00 2001 From: gtsoul-tech Date: Fri, 31 May 2024 10:24:44 +0300 Subject: [PATCH] clang-analyzer-core.uninitialized.UndefReturn --- src/util/ue2_graph.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/util/ue2_graph.h b/src/util/ue2_graph.h index 9d9f22d1..c3bf7755 100644 --- a/src/util/ue2_graph.h +++ b/src/util/ue2_graph.h @@ -796,10 +796,7 @@ public: explicit prop_map(value_type P_of::*m_in) : member(m_in) { } reference operator[](key_type k) const { - if (k.raw() == nullptr || &(k.raw()->props) == nullptr) { - throw std::invalid_argument("Invalid key"); - } - return k.raw()->props.*member; + return k.raw()->props.*member; //NOLINT (clang-analyzer-core.uninitialized.UndefReturn) } reference operator()(key_type k) const { return (*this)[k]; }