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:
parent
998d4c514b
commit
e2b1c71982
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue