summaryrefslogtreecommitdiffstats
path: root/raul/AtomicPtr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'raul/AtomicPtr.hpp')
-rw-r--r--raul/AtomicPtr.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/raul/AtomicPtr.hpp b/raul/AtomicPtr.hpp
index 089b54c..0e086c2 100644
--- a/raul/AtomicPtr.hpp
+++ b/raul/AtomicPtr.hpp
@@ -26,15 +26,15 @@ namespace Raul {
template<typename T>
class AtomicPtr {
public:
-
inline AtomicPtr()
- { g_atomic_pointer_set((volatile gpointer*)&_val, NULL); }
+ { g_atomic_pointer_set(static_cast<volatile gpointer*>(&_val), NULL); }
inline AtomicPtr(const AtomicPtr& copy)
- { g_atomic_pointer_set((volatile gpointer*)(&_val), (gpointer)copy.get()); }
+ { g_atomic_pointer_set(static_cast<volatile gpointer*>(&_val),
+ static_cast<gpointer>(copy.get())); }
inline T* get() const
- { return (T*)g_atomic_pointer_get((volatile gpointer*)(&_val)); }
+ { return static_cast<T*>(g_atomic_pointer_get(static_cast<volatile gpointer*>(&_val))); }
inline void operator=(T* val)
{ g_atomic_pointer_set(&_val, static_cast<gpointer>(val)); }