aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-02 09:20:46 +0100
committerMax Kellermann <max@duempel.org>2013-12-02 11:21:32 +0100
commitaf3b454805b49301b14f2f55f7a99020527bd63a (patch)
tree727405917ba349ea9b5900e77f09173672629f6a /src/pcm
parent3a0f3eaa50c748e2a8e42f15beb4bf447fa1a87c (diff)
downloadmpd-af3b454805b49301b14f2f55f7a99020527bd63a.tar.gz
mpd-af3b454805b49301b14f2f55f7a99020527bd63a.tar.xz
mpd-af3b454805b49301b14f2f55f7a99020527bd63a.zip
pcm/PcmBuffer: add typed method GetT()
Diffstat (limited to 'src/pcm')
-rw-r--r--src/pcm/PcmBuffer.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pcm/PcmBuffer.hxx b/src/pcm/PcmBuffer.hxx
index 717e24938..44a3ebf99 100644
--- a/src/pcm/PcmBuffer.hxx
+++ b/src/pcm/PcmBuffer.hxx
@@ -49,6 +49,12 @@ public:
*/
gcc_malloc
void *Get(size_t size);
+
+ template<typename T>
+ gcc_malloc
+ T *GetT(size_t n) {
+ return (T *)Get(n * sizeof(T));
+ }
};
#endif