summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/instantiate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/quantifiers/instantiate.cpp')
-rw-r--r--src/theory/quantifiers/instantiate.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/theory/quantifiers/instantiate.cpp b/src/theory/quantifiers/instantiate.cpp
index be1633d16..0daf53d2d 100644
--- a/src/theory/quantifiers/instantiate.cpp
+++ b/src/theory/quantifiers/instantiate.cpp
@@ -589,19 +589,13 @@ bool Instantiate::recordInstantiationInternal(Node q, std::vector<Node>& terms)
{
Trace("inst-add-debug")
<< "Adding into context-dependent inst trie" << std::endl;
- CDInstMatchTrie* imt;
- std::map<Node, CDInstMatchTrie*>::iterator it = d_c_inst_match_trie.find(q);
- if (it != d_c_inst_match_trie.end())
- {
- imt = it->second;
- }
- else
+ const auto res = d_c_inst_match_trie.insert({q, nullptr});
+ if (res.second)
{
- imt = new CDInstMatchTrie(d_qstate.getUserContext());
- d_c_inst_match_trie[q] = imt;
+ res.first->second = new CDInstMatchTrie(d_qstate.getUserContext());
}
d_c_inst_match_trie_dom.insert(q);
- return imt->addInstMatch(d_qstate, q, terms);
+ return res.first->second->addInstMatch(d_qstate, q, terms);
}
Trace("inst-add-debug") << "Adding into inst trie" << std::endl;
return d_inst_match_trie[q].addInstMatch(d_qstate, q, terms);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback