Skip to content

Commit

Permalink
ase/gadget.cc: fix emplace() post condition
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Janik <timj@gnu.org>
  • Loading branch information
tim-janik committed Apr 27, 2024
1 parent ef13082 commit d00c87a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ase/gadget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ GadgetImpl::register_accessor (const char *ot, const char *mt, ptrdiff_t offset,
{
auto &cml = cml_set();
auto [celement, inserted] = cml.emplace (ot, classtest);
assert_return (celement != nullptr);
assert_return (celement != cml.end());
GadgetClassMemberList *element = const_cast<GadgetClassMemberList*> (&*celement);
element->members.push_back (new MemberAccessor {mt, offset, std::move (accessfunc), infosp, ev, flags});
//printerr ("%s: %s+%s=%+zd\n", __func__, ot, mt, offset);
Expand Down

0 comments on commit d00c87a

Please sign in to comment.