util/AllocatedString: use std::exchange()
This commit is contained in:
parent
fb450d2f41
commit
71ace2fbac
@ -135,9 +135,7 @@ public:
|
||||
}
|
||||
|
||||
pointer_type Steal() {
|
||||
pointer_type result = value;
|
||||
value = nullptr;
|
||||
return result;
|
||||
return std::exchange(value, nullptr);
|
||||
}
|
||||
|
||||
AllocatedString Clone() const {
|
||||
|
Loading…
Reference in New Issue
Block a user