diff --git a/src/util/AllocatedString.hxx b/src/util/AllocatedString.hxx index 7b1c6af76..ceb307b3a 100644 --- a/src/util/AllocatedString.hxx +++ b/src/util/AllocatedString.hxx @@ -135,9 +135,7 @@ public: } pointer_type Steal() { - pointer_type result = value; - value = nullptr; - return result; + return std::exchange(value, nullptr); } AllocatedString Clone() const {