From 2ef1fa8fc2afd74236180e23ec77f6948e5295d6 Mon Sep 17 00:00:00 2001 From: Daniel Schemmel Date: Fri, 25 May 2018 13:10:32 +0200 Subject: Explicitly initialize value to squelch a potentially uninitialized value warning --- include/klee/Internal/ADT/MapOfSets.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/klee/Internal/ADT/MapOfSets.h b/include/klee/Internal/ADT/MapOfSets.h index c7568577..a5acb059 100644 --- a/include/klee/Internal/ADT/MapOfSets.h +++ b/include/klee/Internal/ADT/MapOfSets.h @@ -99,7 +99,7 @@ namespace klee { std::map children; public: - Node() : isEndOfSet(false) {} + Node() : value(), isEndOfSet(false) {} }; template @@ -187,9 +187,9 @@ namespace klee { template void MapOfSets::insert(const std::set &set, const V &value) { Node *n = &root; - for (typename std::set::const_iterator it = set.begin(), ie = set.end(); - it != ie; ++it) - n = &n->children.insert(std::make_pair(*it, Node())).first->second; + for (auto const& element : set) { + n = &n->children.insert(std::make_pair(element, Node())).first->second; + } n->isEndOfSet = true; n->value = value; } -- cgit 1.4.1