Skip to content

Commit

Permalink
simplify Enumerator::add_elem
Browse files Browse the repository at this point in the history
  • Loading branch information
jensgerlach committed Oct 23, 2015
1 parent b0f66cc commit 862bc53
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Enumerator.h
Expand Up @@ -180,11 +180,9 @@ template <class Name>
void
Enumerator<Name>::add_elem(Name name, int bound)
{
typename map<Name, EnumObject*>::iterator i = objs_.find(name);
assert(i == objs_.end());
assert(objs_.find(name) == objs_.end());

EnumObject *obj = new EnumObject(bound, false, false);
objs_[name] = obj;
objs_[name] = new EnumObject(bound, false, false);
}

template <class Name>
Expand Down

0 comments on commit 862bc53

Please sign in to comment.