fix: always use location of selected torrents in WebUI set location dialogue (#6337)

This commit is contained in:
Yat Ho 2023-12-07 00:10:28 +08:00 committed by GitHub
parent bcc81f61c0
commit 48f9a2376a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -8,6 +8,7 @@
#include <cstddef>
#include <cstdint>
#include <initializer_list>
#include <limits>
#include <memory>
#include <utility> // for std::swap()
#include <vector>
@ -84,7 +85,7 @@ void tr_bandwidth::notify_bandwidth_consumed_bytes(uint64_t const now, RateContr
// ---
tr_bandwidth::tr_bandwidth(tr_bandwidth* parent, bool is_group)
: priority_(is_group ? TR_PRI_NONE : TR_PRI_NORMAL)
: priority_(is_group ? std::numeric_limits<tr_priority_t>::max() : TR_PRI_NORMAL)
{
set_parent(parent);
}
@ -225,7 +226,7 @@ void tr_bandwidth::allocate(uint64_t period_msec)
// allocateBandwidth () is a helper function with two purposes:
// 1. allocate bandwidth to b and its subtree
// 2. accumulate an array of all the peerIos from b and its subtree.
allocate_bandwidth(TR_PRI_NONE, period_msec, refs);
allocate_bandwidth(std::numeric_limits<tr_priority_t>::max(), period_msec, refs);
for (auto const& io : refs)
{

View File

@ -1014,8 +1014,7 @@ enum : tr_priority_t
{
TR_PRI_LOW = -1,
TR_PRI_NORMAL = 0, /* since Normal is 0, memset initializes nicely */
TR_PRI_HIGH = 1,
TR_PRI_NONE
TR_PRI_HIGH = 1
};
/**