diff options
Diffstat (limited to 'test/test_pcm_util.hxx')
-rw-r--r-- | test/test_pcm_util.hxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test_pcm_util.hxx b/test/test_pcm_util.hxx index b378c75a7..f1efbc666 100644 --- a/test/test_pcm_util.hxx +++ b/test/test_pcm_util.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -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> |