From db890d3a81bfe6760e9f4ea981798269abb60a20 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 25 Jun 2018 21:33:48 +0200 Subject: nets and cells are unique_ptr's --- common/util.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'common/util.h') diff --git a/common/util.h b/common/util.h index 5e938635..b1cab650 100644 --- a/common/util.h +++ b/common/util.h @@ -57,9 +57,12 @@ 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 std::map sorted(const std::unordered_map &orig) +template std::map sorted(const std::unordered_map> &orig) { - return std::map(orig.begin(), orig.end()); + std::map retVal; + for(auto& item : orig) + retVal.emplace(std::make_pair(item.first,item.second.get())); + return retVal; }; NEXTPNR_NAMESPACE_END -- cgit v1.2.3