mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 07:11:49 +00:00
COMMON: Fix clang build
In C++11 standard, nullptr_t is defined in std and not in global space
This commit is contained in:
parent
e76f53c8d8
commit
f8ff774b8d
10
common/ptr.h
10
common/ptr.h
@ -27,6 +27,10 @@
|
||||
#include "common/noncopyable.h"
|
||||
#include "common/safe-bool.h"
|
||||
#include "common/types.h"
|
||||
#ifdef USE_CXX11
|
||||
/* For nullptr_t */
|
||||
#include <cstddef>
|
||||
#endif
|
||||
|
||||
namespace Common {
|
||||
|
||||
@ -86,7 +90,7 @@ public:
|
||||
}
|
||||
|
||||
#ifdef USE_CXX11
|
||||
explicit BasePtr(nullptr_t) : _refCount(nullptr), _deletion(nullptr), _pointer(nullptr) {
|
||||
explicit BasePtr(std::nullptr_t) : _refCount(nullptr), _deletion(nullptr), _pointer(nullptr) {
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -283,7 +287,7 @@ public:
|
||||
}
|
||||
|
||||
#ifdef USE_CXX11
|
||||
SharedPtr(nullptr_t) : BasePtr<T>() {
|
||||
SharedPtr(std::nullptr_t) : BasePtr<T>() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -349,7 +353,7 @@ public:
|
||||
}
|
||||
|
||||
#ifdef USE_CXX11
|
||||
WeakPtr(nullptr_t) : BasePtr<T>() {
|
||||
WeakPtr(std::nullptr_t) : BasePtr<T>() {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user