clang-analyzer-core.uninitialized.UndefReturn

This commit is contained in:
gtsoul-tech 2024-05-31 10:24:44 +03:00
parent e36203c323
commit 00a5ff1c67

View File

@ -796,10 +796,7 @@ public:
explicit prop_map(value_type P_of::*m_in) : member(m_in) { } explicit prop_map(value_type P_of::*m_in) : member(m_in) { }
reference operator[](key_type k) const { reference operator[](key_type k) const {
if (k.raw() == nullptr || &(k.raw()->props) == nullptr) { return k.raw()->props.*member; //NOLINT (clang-analyzer-core.uninitialized.UndefReturn)
throw std::invalid_argument("Invalid key");
}
return k.raw()->props.*member;
} }
reference operator()(key_type k) const { return (*this)[k]; } reference operator()(key_type k) const { return (*this)[k]; }