mirror of
https://github.com/transmission/transmission
synced 2025-02-22 22:20:39 +00:00
fix: blocklists allocate more memory than they need (#4953)
This commit is contained in:
parent
671f835228
commit
ed8133520f
1 changed files with 1 additions and 1 deletions
|
@ -390,7 +390,7 @@ void Blocklist::ensureLoaded() const
|
||||||
}
|
}
|
||||||
|
|
||||||
auto range = address_range_t{};
|
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)))
|
while (in.read(reinterpret_cast<char*>(&range), sizeof(range)))
|
||||||
{
|
{
|
||||||
rules_.emplace_back(range);
|
rules_.emplace_back(range);
|
||||||
|
|
Loading…
Reference in a new issue