Skip to content

Commit 1c3900f

Browse files
committed
xrCore/xr_resource: Fixed compilation with GCC.
1 parent 13d9838 commit 1c3900f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/xrCore/xr_resource.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,25 @@ class resptr_core : public C
6161
typedef resptr_core<T, C> self;
6262
public:
6363
// construction
64-
resptr_core() { p_ = 0; }
65-
resptr_core(T* p, bool add_ref = true) { p_ = p; if (add_ref) _inc(); }
66-
resptr_core(const self& rhs) { p_ = rhs.p_; _inc(); }
67-
~resptr_core() { _dec(); }
64+
resptr_core() { C::p_ = 0; }
65+
resptr_core(T* p, bool add_ref = true) { C::p_ = p; if (add_ref) C::_inc(); }
66+
resptr_core(const self& rhs) { C::p_ = rhs.p_; C::_inc(); }
67+
~resptr_core() { C::_dec(); }
6868

6969
// assignment
7070
self& operator= (const self& rhs) { _set(rhs); return (self&)*this; }
7171

7272
// accessors
73-
T& operator*() const { return *p_; }
74-
T* operator->() const { return p_; }
73+
T& operator*() const { return *C::p_; }
74+
T* operator->() const { return C::p_; }
7575

7676
// unspecified bool type
7777
typedef T* (resptr_core::*unspecified_bool_type) () const;
78-
operator unspecified_bool_type () const { return p_ == 0 ? 0 : &resptr_core::_get; }
79-
bool operator! () const { return p_ == 0; }
78+
operator unspecified_bool_type () const { return C::p_ == 0 ? 0 : &resptr_core::_get; }
79+
bool operator! () const { return C::p_ == 0; }
8080

8181
// fast swapping
82-
void swap(self& rhs) { T* tmp = p_; p_ = rhs.p_; rhs.p_ = tmp; }
82+
void swap(self& rhs) { T* tmp = C::p_; C::p_ = rhs.p_; rhs.p_ = tmp; }
8383
};
8484

8585
// res_ptr == res_ptr

0 commit comments

Comments
 (0)