1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

fix: unused variable warning when building in release mode

This commit is contained in:
Charles Kerr 2021-11-28 08:05:44 -06:00
parent 998d4c514b
commit e2b1c71982

View file

@ -120,9 +120,11 @@ void Bandwidth::setParent(Bandwidth* new_parent)
if (new_parent != nullptr)
{
#ifdef TR_ENABLE_ASSERTS
TR_ASSERT(new_parent->parent_ != this);
auto& children = new_parent->children_;
TR_ASSERT(std::find(std::begin(children), std::end(children), this) == std::end(children)); // not already there
#endif
new_parent->children_.push_back(this);
this->parent_ = new_parent;