aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/AllocatedPath.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/AllocatedPath.hxx')
-rw-r--r--src/fs/AllocatedPath.hxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/fs/AllocatedPath.hxx b/src/fs/AllocatedPath.hxx
index c345470c8..7195a3345 100644
--- a/src/fs/AllocatedPath.hxx
+++ b/src/fs/AllocatedPath.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -44,13 +44,6 @@ class AllocatedPath {
string value;
- struct Donate {};
-
- /**
- * Donate the allocated pointer to a new #AllocatedPath object.
- */
- AllocatedPath(Donate, pointer _value);
-
AllocatedPath(const_pointer _value):value(_value) {}
AllocatedPath(string &&_value):value(std::move(_value)) {}
@@ -169,6 +162,16 @@ public:
return *this;
}
+ gcc_pure
+ bool operator==(const AllocatedPath &other) const {
+ return value == other.value;
+ }
+
+ gcc_pure
+ bool operator!=(const AllocatedPath &other) const {
+ return value != other.value;
+ }
+
/**
* Allows the caller to "steal" the internal value by
* providing a rvalue reference to the std::string attribute.