Commit 71ace2fb authored by Max Kellermann's avatar Max Kellermann

util/AllocatedString: use std::exchange()

parent fb450d2f
......@@ -135,9 +135,7 @@ public:
}
pointer_type Steal() {
pointer_type result = value;
value = nullptr;
return result;
return std::exchange(value, nullptr);
}
AllocatedString Clone() const {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment