mirror of
https://github.com/transmission/transmission.git
synced 2025-12-25 12:48:10 +00:00
refactor: intern tr_torrent.bandwidth_group_ (#3000)
Most use cases involve either (a) using the default group or (b) sharing a group with other torrents. In both cases, using a tr_quark is cheaper than a std::string.
This commit is contained in:
@@ -562,7 +562,7 @@ static void initField(tr_torrent const* const tor, tr_stat const* const st, tr_v
|
||||
break;
|
||||
|
||||
case TR_KEY_group:
|
||||
tr_variantInitStrView(initme, tor->group);
|
||||
tr_variantInitStrView(initme, tor->bandwidthGroup().sv());
|
||||
break;
|
||||
|
||||
case TR_KEY_hashString:
|
||||
@@ -1162,7 +1162,7 @@ static char const* torrentSet(
|
||||
|
||||
if (std::string_view group; tr_variantDictFindStrView(args_in, TR_KEY_group, &group))
|
||||
{
|
||||
tor->setGroup(group);
|
||||
tor->setBandwidthGroup(group);
|
||||
}
|
||||
|
||||
if (errmsg == nullptr && tr_variantDictFindList(args_in, TR_KEY_labels, &tmp_variant))
|
||||
|
||||
Reference in New Issue
Block a user