diff options
author | Max Kellermann <max@duempel.org> | 2014-09-28 18:12:17 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-09-28 18:12:20 +0200 |
commit | cf06ba6d132ed29616cad89c6ee23e5334025f97 (patch) | |
tree | 51afb7fc192855a6a9ce480e9e0ec43c0cdd8c41 /src/fs/AllocatedPath.hxx | |
parent | a8d800572e21cdb9d0cb31f012918703cb267f5c (diff) | |
download | mpd-cf06ba6d132ed29616cad89c6ee23e5334025f97.tar.gz mpd-cf06ba6d132ed29616cad89c6ee23e5334025f97.tar.xz mpd-cf06ba6d132ed29616cad89c6ee23e5334025f97.zip |
fs/AllocatedPath: add method Steal()
Diffstat (limited to '')
-rw-r--r-- | src/fs/AllocatedPath.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fs/AllocatedPath.hxx b/src/fs/AllocatedPath.hxx index 42594b2f6..c345470c8 100644 --- a/src/fs/AllocatedPath.hxx +++ b/src/fs/AllocatedPath.hxx @@ -170,6 +170,14 @@ public: } /** + * Allows the caller to "steal" the internal value by + * providing a rvalue reference to the std::string attribute. + */ + std::string &&Steal() { + return std::move(value); + } + + /** * Check if this is a "nulled" instance. A "nulled" instance * must not be used. */ |