Skip to content

Commit

Permalink
libcore: Use inline methods in the PrivateAutoPtr class
Browse files Browse the repository at this point in the history
The compiler probably already makes these inline, but making it
explicit doesn't hurt.
  • Loading branch information
skyjake committed Jul 15, 2016
1 parent 3a9df40 commit 7394442
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doomsday/sdk/libcore/include/de/libcore.h
Expand Up @@ -386,8 +386,8 @@ class PrivateAutoPtr
PrivateAutoPtr(ImplType *p) : ptr(p) {}
~PrivateAutoPtr() { reset(); }

ImplType &operator * () const { return *ptr; }
ImplType *operator -> () const { return ptr; }
inline ImplType &operator * () const { return *ptr; }
inline ImplType *operator -> () const { return ptr; }
void reset(ImplType *p = 0) {
IPrivate *ip = reinterpret_cast<IPrivate *>(ptr);
if (ip)
Expand All @@ -397,13 +397,13 @@ class PrivateAutoPtr
}
ptr = p;
}
ImplType *get() const {
inline ImplType *get() const {
return ptr;
}
ImplType const *getConst() const {
inline ImplType const *getConst() const {
return ptr;
}
operator ImplType *() const {
inline operator ImplType *() const {
return ptr;
}
ImplType *release() {
Expand All @@ -414,7 +414,7 @@ class PrivateAutoPtr
void swap(PrivateAutoPtr &other) {
std::swap(ptr, other.ptr);
}
bool isNull() const {
inline bool isNull() const {
return !ptr;
}
#ifdef DENG2_DEBUG
Expand Down

0 comments on commit 7394442

Please sign in to comment.