mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
fix: blocklists allocate more memory than they need (#4953)
This commit is contained in:
@@ -390,7 +390,7 @@ void Blocklist::ensureLoaded() const
|
||||
}
|
||||
|
||||
auto range = address_range_t{};
|
||||
rules_.reserve(file_info->size - std::size(BinContentsPrefix) / sizeof(address_range_t));
|
||||
rules_.reserve((file_info->size - std::size(BinContentsPrefix)) / sizeof(address_range_t));
|
||||
while (in.read(reinterpret_cast<char*>(&range), sizeof(range)))
|
||||
{
|
||||
rules_.emplace_back(range);
|
||||
|
||||
Reference in New Issue
Block a user