aboutsummaryrefslogtreecommitdiffstats
path: root/include/secmem.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-07-23 15:44:04 +0000
committerlloyd <[email protected]>2007-07-23 15:44:04 +0000
commite2f1f734277146d817ab284dea21e4013cb5b937 (patch)
tree21ad6ee775e36aa7fb24a504077200c22b1f15b8 /include/secmem.h
parent211c4929ae92106794984d872a0cae1a873baa29 (diff)
Avoid C-style casts (as detected by GCC's -Wold-style-cast) and instead use
static_cast or reinterpret_cast, as needed.
Diffstat (limited to 'include/secmem.h')
-rw-r--r--include/secmem.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/secmem.h b/include/secmem.h
index 2b5e046f8..b50022c83 100644
--- a/include/secmem.h
+++ b/include/secmem.h
@@ -78,7 +78,11 @@ class MemoryRegion
void init(bool locking, u32bit size = 0)
{ alloc = Allocator::get(locking); create(size); }
private:
- T* allocate(u32bit n) const { return (T*)alloc->allocate(sizeof(T)*n); }
+ T* allocate(u32bit n) const
+ {
+ return static_cast<T*>(alloc->allocate(sizeof(T)*n));
+ }
+
void deallocate(T* p, u32bit n) const
{ alloc->deallocate(p, sizeof(T)*n); }