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