pcm/PcmBuffer: add typed method GetT()
This commit is contained in:
parent
3a0f3eaa50
commit
af3b454805
@ -49,6 +49,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
gcc_malloc
|
gcc_malloc
|
||||||
void *Get(size_t size);
|
void *Get(size_t size);
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
gcc_malloc
|
||||||
|
T *GetT(size_t n) {
|
||||||
|
return (T *)Get(n * sizeof(T));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user