summaryrefslogtreecommitdiff
path: root/src/theory/theory_model_builder.cpp
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2020-03-05 11:42:54 -0800
committerGitHub <noreply@github.com>2020-03-05 11:42:54 -0800
commit04039407e6308070c148de0d5e93640ec1b0a341 (patch)
treeb66f63d49df0713b1ca2a440bec89f1d60af32a4 /src/theory/theory_model_builder.cpp
parent18fe192c29a9a2c37d1925730af01e906b9888c5 (diff)
Enable -Wshadow and fix warnings. (#3909)
Fixes all -Wshadow warnings and enables the -Wshadow compile flag globally. Co-authored-by: Clark Barrett <barrett@cs.stanford.edu> Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com> Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com> Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu> Co-authored-by: makaimann <makaim@stanford.edu> Co-authored-by: yoni206 <yoni206@users.noreply.github.com> Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com> Co-authored-by: AleksandarZeljic <zeljic@stanford.edu> Co-authored-by: Caleb Donovick <cdonovick@users.noreply.github.com> Co-authored-by: Amalee <amaleewilson@gmail.com> Co-authored-by: Scott Kovach <dskovach@gmail.com> Co-authored-by: ntsis <nekuna@gmail.com>
Diffstat (limited to 'src/theory/theory_model_builder.cpp')
-rw-r--r--src/theory/theory_model_builder.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/theory/theory_model_builder.cpp b/src/theory/theory_model_builder.cpp
index a96f29ada..68ad25490 100644
--- a/src/theory/theory_model_builder.cpp
+++ b/src/theory/theory_model_builder.cpp
@@ -736,7 +736,6 @@ bool TheoryEngineModelBuilder::buildModel(Model* m)
}
#endif
- set<Node>* repSet = typeRepSet.getSet(t);
TypeNode tb = t.getBaseType();
if (!assignOne)
{
@@ -755,6 +754,7 @@ bool TheoryEngineModelBuilder::buildModel(Model* m)
bool assignable, evaluable CVC4_UNUSED;
std::map<Node, Assigner>::iterator itAssigner;
std::map<Node, Node>::iterator itAssignerM;
+ set<Node>* repSet = typeRepSet.getSet(t);
for (i = noRepSet.begin(); i != noRepSet.end();)
{
i2 = i;
@@ -928,11 +928,10 @@ bool TheoryEngineModelBuilder::buildModel(Model* m)
for (it = typeNoRepSet.begin(); it != typeNoRepSet.end(); ++it)
{
set<Node>& noRepSet = TypeSet::getSet(it);
- set<Node>::iterator i;
- for (i = noRepSet.begin(); i != noRepSet.end(); ++i)
+ for (const Node& node : noRepSet)
{
- tm->d_reps[*i] = *i;
- tm->d_rep_set.add((*i).getType(), *i);
+ tm->d_reps[node] = node;
+ tm->d_rep_set.add(node.getType(), node);
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback