aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-26 14:13:52 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-26 14:13:52 +0200
commit103dde79de25e2f9250b27134aa3d547d42408e2 (patch)
treea1726abff970476179e2395403f9cd5da274ca30 /common/util.h
parentded9df61dc1ce390a6751c214c02a2acb3a57577 (diff)
downloadnextpnr-103dde79de25e2f9250b27134aa3d547d42408e2.tar.gz
nextpnr-103dde79de25e2f9250b27134aa3d547d42408e2.tar.bz2
nextpnr-103dde79de25e2f9250b27134aa3d547d42408e2.zip
Fixing Python bindings after adding unique_ptr
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/util.h b/common/util.h
index b1cab650..c888c8b8 100644
--- a/common/util.h
+++ b/common/util.h
@@ -57,11 +57,11 @@ bool bool_or_default(const Container &ct, const KeyType &key, bool def = false)
};
// Wrap an unordered_map, and allow it to be iterated over sorted by key
-template <typename K, typename V> std::map<K, V*> sorted(const std::unordered_map<K, std::unique_ptr<V>> &orig)
+template <typename K, typename V> std::map<K, V *> sorted(const std::unordered_map<K, std::unique_ptr<V>> &orig)
{
- std::map<K, V*> retVal;
- for(auto& item : orig)
- retVal.emplace(std::make_pair(item.first,item.second.get()));
+ std::map<K, V *> retVal;
+ for (auto &item : orig)
+ retVal.emplace(std::make_pair(item.first, item.second.get()));
return retVal;
};