diff options
author | Max Kellermann <max@duempel.org> | 2013-01-31 20:33:26 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-31 21:11:06 +0100 |
commit | 1b175025fecb1c10e6719d4ab79c188d473fccc4 (patch) | |
tree | a1d04e92416e72c78f474de25c0aeee3374d47a1 /src/PcmUtils.hxx | |
parent | ccdf7184bea4bcc38ae468095ec400e2a2a4db3b (diff) | |
download | mpd-1b175025fecb1c10e6719d4ab79c188d473fccc4.tar.gz mpd-1b175025fecb1c10e6719d4ab79c188d473fccc4.tar.xz mpd-1b175025fecb1c10e6719d4ab79c188d473fccc4.zip |
pcm_*: convert to C++
Diffstat (limited to '')
-rw-r--r-- | src/PcmUtils.hxx (renamed from src/pcm_utils.h) | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pcm_utils.h b/src/PcmUtils.hxx index 21df95e48..a95af7e68 100644 --- a/src/pcm_utils.h +++ b/src/PcmUtils.hxx @@ -29,10 +29,11 @@ * function to convert a source pointer and a byte count to an "end" * pointer for use in loops. */ -static inline const void * -pcm_end_pointer(const void *p, size_t size) +template<typename T> +static inline const T * +pcm_end_pointer(const T *p, size_t size) { - return (const char *)p + size; + return (const T *)((const uint8_t *)p + size); } /** |