Skip to content

Commit 6d97eac

Browse files
authored
Merge pull request #1742 from evoskuil/master
Remove shrink_to_fit() from collection utils.
2 parents 91219de + 8e98b8b commit 6d97eac

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ build
2727
/libtool
2828
.dirstamp
2929
/.vs
30+
*.db-wal
31+
*.db-shm
32+
*.db

include/bitcoin/system/impl/data/collection.ipp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ constexpr void distinct(Collection& list) NOEXCEPT
188188
{
189189
std::sort(std::begin(list), std::end(list));
190190
list.erase(std::unique(std::begin(list), std::end(list)), std::end(list));
191-
list.shrink_to_fit();
191+
////list.shrink_to_fit();
192192
}
193193

194194
template <typename Collection>
@@ -222,7 +222,7 @@ inline Left difference(const typename Left::const_iterator& begin,
222222
if (!contains(right, *min))
223223
copy.push_back(*min);
224224

225-
copy.shrink_to_fit();
225+
////copy.shrink_to_fit();
226226
return copy;
227227
}
228228

0 commit comments

Comments
 (0)