diff options
author | Max Kellermann <max@duempel.org> | 2014-01-06 22:42:02 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-06 23:08:49 +0100 |
commit | c75339edcc8ced25a71ab96a309736986c04465b (patch) | |
tree | 59f152918425469f4da7ce08cf1954d326636688 /test/test_pcm_util.hxx | |
parent | b0b7244b3aa238e22136fd16095e2b8d452b2cec (diff) | |
download | mpd-c75339edcc8ced25a71ab96a309736986c04465b.tar.gz mpd-c75339edcc8ced25a71ab96a309736986c04465b.tar.xz mpd-c75339edcc8ced25a71ab96a309736986c04465b.zip |
pcm/Format: change parameters/return values to ConstBuffer
Diffstat (limited to '')
-rw-r--r-- | test/test_pcm_util.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_pcm_util.hxx b/test/test_pcm_util.hxx index b378c75a7..216e360ce 100644 --- a/test/test_pcm_util.hxx +++ b/test/test_pcm_util.hxx @@ -17,6 +17,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "util/ConstBuffer.hxx" + #include <array> #include <random> @@ -76,6 +78,14 @@ public: operator typename std::array<T, N>::const_pointer() const { return begin(); } + + operator ConstBuffer<T>() const { + return { begin(), size() }; + } + + operator ConstBuffer<void>() const { + return { begin(), size() * sizeof(T) }; + } }; template<typename T> |