GUI2/Grid: made use of std::exchange
This commit is contained in:
parent
c15cb0696e
commit
4a5d34d1be
1 changed files with 1 additions and 4 deletions
|
@ -409,10 +409,7 @@ private:
|
|||
*/
|
||||
std::unique_ptr<widget> free_widget()
|
||||
{
|
||||
std::unique_ptr<widget> temp(nullptr);
|
||||
widget_.swap(temp);
|
||||
|
||||
return temp;
|
||||
return std::exchange(widget_, nullptr);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue