general: remove macros for compatibility with non-C++11 compilers

Now that we require MSVC 2015, we no longer need all this nonsense, so we can write cleaner code.
This commit is contained in:
rdb 2018-05-23 23:30:39 +02:00
parent f45ddcab2f
commit 9fad3dba60
159 changed files with 522 additions and 1021 deletions

View File

@ -33,16 +33,7 @@ using namespace std;
#define INLINE inline
#define ALWAYS_INLINE inline
#define TYPENAME typename
#define CONSTEXPR constexpr
#define ALWAYS_INLINE_CONSTEXPR constexpr
#define NOEXCEPT noexcept
#define FINAL final
#define MOVE(x) x
#define DEFAULT_CTOR = default
#define DEFAULT_DTOR = default
#define DEFAULT_ASSIGN = default
#define DELETED = delete
#define DELETED_ASSIGN = delete
#define EXPORT_TEMPLATE_CLASS(expcl, exptp, classname)
@ -81,15 +72,9 @@ typedef int ios_seekdir;
#include <string>
#include <utility>
#ifdef HAVE_NAMESPACE
using namespace std;
#endif
#ifdef HAVE_TYPENAME
#define TYPENAME typename
#else
#define TYPENAME
#endif
#ifndef HAVE_WCHAR_T
// Some C++ libraries (os x 3.1) don't define this.
@ -124,18 +109,20 @@ typedef ios::seekdir ios_seekdir;
#if defined(__GLIBCXX__) && __GLIBCXX__ <= 20070719
#include <tr1/tuple>
using std::tr1::tuple;
using std::tr1::tie;
namespace std {
using std::tr1::tuple;
using std::tr1::tie;
typedef decltype(nullptr) nullptr_t;
typedef decltype(nullptr) nullptr_t;
template<class T> struct remove_reference {typedef T type;};
template<class T> struct remove_reference<T&> {typedef T type;};
template<class T> struct remove_reference<T&& >{typedef T type;};
template<class T> struct remove_reference {typedef T type;};
template<class T> struct remove_reference<T&> {typedef T type;};
template<class T> struct remove_reference<T&& >{typedef T type;};
template<class T> typename remove_reference<T>::type &&move(T &&t) {
return static_cast<typename remove_reference<T>::type&&>(t);
}
template<class T> typename remove_reference<T>::type &&move(T &&t) {
return static_cast<typename remove_reference<T>::type&&>(t);
}
};
#endif
#ifdef _MSC_VER
@ -156,110 +143,12 @@ template<class T> typename remove_reference<T>::type &&move(T &&t) {
#endif
// Determine the availability of C++11 features.
#if defined(__has_extension) // Clang magic.
# if __has_extension(cxx_constexpr)
# if !defined(__apple_build_version__) || __apple_build_version__ >= 5000000
# define CONSTEXPR constexpr
# endif
# endif
# if __has_extension(cxx_noexcept)
# define NOEXCEPT noexcept
# endif
# if __has_extension(cxx_rvalue_references) && (__cplusplus >= 201103L)
# define USE_MOVE_SEMANTICS
# define MOVE(x) move(x)
# endif
# if __has_extension(cxx_override_control) && (__cplusplus >= 201103L)
# define FINAL final
# endif
# if __has_extension(cxx_defaulted_functions)
# define DEFAULT_CTOR = default
# define DEFAULT_DTOR = default
# define DEFAULT_ASSIGN = default
# endif
# if __has_extension(cxx_deleted_functions)
# define DELETED = delete
# endif
#elif defined(__GNUC__) // GCC
// Starting at GCC 4.4
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
# define DEFAULT_CTOR = default
# define DEFAULT_DTOR = default
# define DEFAULT_ASSIGN = default
# define DELETED = delete
# endif
// Starting at GCC 4.6
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
# define CONSTEXPR constexpr
# define NOEXCEPT noexcept
# define USE_MOVE_SEMANTICS
# define MOVE(x) move(x)
# endif
// Starting at GCC 4.7
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
# define FINAL final
# endif
// GCC defines several macros which we can query. List of all supported
// builtin macros: https://gcc.gnu.org/projects/cxx-status.html
# if !defined(CONSTEXPR) && __cpp_constexpr >= 200704
# define CONSTEXPR constexpr
# endif
#elif defined(_MSC_VER) && _MSC_VER >= 1900 // Visual Studio 2015
# define CONSTEXPR constexpr
# define NOEXCEPT noexcept
# define USE_MOVE_SEMANTICS
# define FINAL final
# define MOVE(x) move(x)
#elif defined(_MSC_VER) && _MSC_VER >= 1600 // Visual Studio 2010
# define NOEXCEPT throw()
# define USE_MOVE_SEMANTICS
# define FINAL sealed
# define MOVE(x) move(x)
#if defined(_MSC_VER) && _MSC_VER < 1900 // Visual Studio 2015
#error Microsoft Visual C++ 2015 or later is required to compile Panda3D.
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1800 // Visual Studio 2013
# define DEFAULT_CTOR = default
# define DEFAULT_DTOR = default
# define DEFAULT_ASSIGN = default
# define DELETED = delete
#endif
// Fallbacks if features are not supported
#ifndef CONSTEXPR
# define CONSTEXPR INLINE
# define ALWAYS_INLINE_CONSTEXPR ALWAYS_INLINE
#else
# define ALWAYS_INLINE_CONSTEXPR ALWAYS_INLINE CONSTEXPR
#endif
#ifndef NOEXCEPT
# define NOEXCEPT
#endif
#ifndef MOVE
# define MOVE(x) x
#endif
#ifndef FINAL
# define FINAL
#endif
#ifndef DEFAULT_CTOR
# define DEFAULT_CTOR {}
#endif
#ifndef DEFAULT_DTOR
# define DEFAULT_DTOR {}
#endif
#ifndef DEFAULT_ASSIGN
# define DEFAULT_ASSIGN {return *this;}
#endif
#ifndef DELETED
# define DELETED {assert(false);}
# define DELETED_ASSIGN {assert(false);return *this;}
#else
# define DELETED_ASSIGN DELETED
#endif
// This is just to support code generated with older versions of interrogate.
#define MOVE(x) (std::move(x))
#ifndef LINK_ALL_STATIC

View File

@ -18,9 +18,7 @@
#include <string.h>
#include <string>
#ifdef HAVE_NAMESPACE
using namespace std;
#endif
class fake_istream_buffer {
public:

View File

@ -38,7 +38,7 @@ dec_heap(size_t size) {
* Returns the global memory alignment. This is the number of bytes at which
* each allocated memory pointer will be aligned.
*/
CONSTEXPR size_t MemoryHook::
constexpr size_t MemoryHook::
get_memory_alignment() {
return MEMORY_HOOK_ALIGNMENT;
}

View File

@ -52,7 +52,7 @@ public:
bool heap_trim(size_t pad);
CONSTEXPR static size_t get_memory_alignment();
constexpr static size_t get_memory_alignment();
virtual void *mmap_alloc(size_t size, bool allow_exec);
virtual void mmap_free(void *ptr, size_t size);

View File

@ -23,11 +23,10 @@
*/
class EXPCL_DTOOL_DTOOLBASE MutexDummyImpl {
public:
CONSTEXPR MutexDummyImpl() DEFAULT_CTOR;
constexpr MutexDummyImpl() = default;
MutexDummyImpl(const MutexDummyImpl &copy) = delete;
private:
MutexDummyImpl(const MutexDummyImpl &copy) DELETED;
MutexDummyImpl &operator = (const MutexDummyImpl &copy) DELETED_ASSIGN;
MutexDummyImpl &operator = (const MutexDummyImpl &copy) = delete;
public:
ALWAYS_INLINE void lock();

View File

@ -14,8 +14,8 @@
/**
*
*/
CONSTEXPR MutexPosixImpl::
MutexPosixImpl() NOEXCEPT : _lock(PTHREAD_MUTEX_INITIALIZER) {
constexpr MutexPosixImpl::
MutexPosixImpl() noexcept : _lock(PTHREAD_MUTEX_INITIALIZER) {
}
/**
@ -63,8 +63,8 @@ unlock() {
*
*/
#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
CONSTEXPR ReMutexPosixImpl::
ReMutexPosixImpl() NOEXCEPT : _lock(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) {
constexpr ReMutexPosixImpl::
ReMutexPosixImpl() noexcept : _lock(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) {
}
#else
INLINE ReMutexPosixImpl::

View File

@ -28,12 +28,11 @@
*/
class EXPCL_DTOOL_DTOOLBASE MutexPosixImpl {
public:
CONSTEXPR MutexPosixImpl() NOEXCEPT;
constexpr MutexPosixImpl() noexcept;
MutexPosixImpl(const MutexPosixImpl &copy) = delete;
INLINE ~MutexPosixImpl();
private:
MutexPosixImpl(const MutexPosixImpl &copy) DELETED;
MutexPosixImpl &operator = (const MutexPosixImpl &copy) DELETED_ASSIGN;
MutexPosixImpl &operator = (const MutexPosixImpl &copy) = delete;
public:
INLINE void lock();
@ -51,15 +50,14 @@ private:
class EXPCL_DTOOL_DTOOLBASE ReMutexPosixImpl {
public:
#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
CONSTEXPR ReMutexPosixImpl() NOEXCEPT;
constexpr ReMutexPosixImpl() noexcept;
#else
INLINE ReMutexPosixImpl();
#endif
ReMutexPosixImpl(const ReMutexPosixImpl &copy) = delete;
INLINE ~ReMutexPosixImpl();
private:
ReMutexPosixImpl(const ReMutexPosixImpl &copy) DELETED;
ReMutexPosixImpl &operator = (const ReMutexPosixImpl &copy) DELETED;
ReMutexPosixImpl &operator = (const ReMutexPosixImpl &copy) = delete;
public:
INLINE void lock();

View File

@ -14,7 +14,7 @@
/**
*
*/
CONSTEXPR MutexSpinlockImpl::
constexpr MutexSpinlockImpl::
MutexSpinlockImpl() : _lock(0) {
}

View File

@ -29,11 +29,10 @@
*/
class EXPCL_DTOOL_DTOOLBASE MutexSpinlockImpl {
public:
CONSTEXPR MutexSpinlockImpl();
constexpr MutexSpinlockImpl();
MutexSpinlockImpl(const MutexSpinlockImpl &copy) = delete;
private:
MutexSpinlockImpl(const MutexSpinlockImpl &copy) DELETED;
MutexSpinlockImpl &operator = (const MutexSpinlockImpl &copy) DELETED_ASSIGN;
MutexSpinlockImpl &operator = (const MutexSpinlockImpl &copy) = delete;
public:
INLINE void lock();

View File

@ -29,11 +29,10 @@
class EXPCL_DTOOL_DTOOLBASE MutexWin32Impl {
public:
MutexWin32Impl();
MutexWin32Impl(const MutexWin32Impl &copy) = delete;
INLINE ~MutexWin32Impl();
private:
MutexWin32Impl(const MutexWin32Impl &copy) DELETED;
MutexWin32Impl &operator = (const MutexWin32Impl &copy) DELETED_ASSIGN;
MutexWin32Impl &operator = (const MutexWin32Impl &copy) = delete;
public:
INLINE void lock();

View File

@ -24,17 +24,17 @@
// identifier, and then returning the value of that identifier, seems to lead
// to compilation errors (at least in VC7) in which sometimes
// IS_THRESHOLD_COMPEQ(a, a, get_nearly_zero_value(a)) != 0.
CONSTEXPR double
constexpr double
get_nearly_zero_value(double) {
return 1.0e-12;
}
CONSTEXPR float
constexpr float
get_nearly_zero_value(float) {
return 1.0e-6f;
}
CONSTEXPR int
constexpr int
get_nearly_zero_value(int) {
// This is a bit silly, but we should nevertheless define it in case it is
// called for an integer type.

View File

@ -13,7 +13,7 @@
template<class Type>
INLINE pallocator_single<Type>::
pallocator_single(TypeHandle type_handle) NOEXCEPT :
pallocator_single(TypeHandle type_handle) noexcept :
_type_handle(type_handle)
{
}
@ -37,7 +37,7 @@ deallocate(TYPENAME pallocator_single<Type>::pointer p, TYPENAME pallocator_sing
template<class Type>
INLINE pallocator_array<Type>::
pallocator_array(TypeHandle type_handle) NOEXCEPT :
pallocator_array(TypeHandle type_handle) noexcept :
_type_handle(type_handle)
{
}

View File

@ -52,11 +52,11 @@ public:
typedef TYPENAME allocator<Type>::const_reference const_reference;
typedef TYPENAME allocator<Type>::size_type size_type;
INLINE pallocator_single(TypeHandle type_handle) NOEXCEPT;
INLINE pallocator_single(TypeHandle type_handle) noexcept;
// template member functions in VC++ can only be defined in-class.
template<class U>
INLINE pallocator_single(const pallocator_single<U> &copy) NOEXCEPT :
INLINE pallocator_single(const pallocator_single<U> &copy) noexcept :
_type_handle(copy._type_handle) { }
INLINE Type *allocate(size_type n, allocator<void>::const_pointer hint = 0)
@ -81,11 +81,11 @@ public:
typedef TYPENAME allocator<Type>::const_reference const_reference;
typedef TYPENAME allocator<Type>::size_type size_type;
INLINE pallocator_array(TypeHandle type_handle = TypeHandle::none()) NOEXCEPT;
INLINE pallocator_array(TypeHandle type_handle = TypeHandle::none()) noexcept;
// template member functions in VC++ can only be defined in-class.
template<class U>
INLINE pallocator_array(const pallocator_array<U> &copy) NOEXCEPT :
INLINE pallocator_array(const pallocator_array<U> &copy) noexcept :
_type_handle(copy._type_handle) { }
INLINE Type *allocate(size_type n, allocator<void>::const_pointer hint = 0)

View File

@ -43,27 +43,24 @@ class pvector : public vector<Type, pallocator_array<Type> > {
public:
typedef pallocator_array<Type> allocator;
typedef vector<Type, allocator> base_class;
typedef TYPENAME base_class::size_type size_type;
typedef typename base_class::size_type size_type;
explicit pvector(TypeHandle type_handle = pvector_type_handle) : base_class(allocator(type_handle)) { }
pvector(const pvector<Type> &copy) : base_class(copy) { }
pvector(pvector<Type> &&from) noexcept : base_class(move(from)) {};
explicit pvector(size_type n, TypeHandle type_handle = pvector_type_handle) : base_class(n, Type(), allocator(type_handle)) { }
explicit pvector(size_type n, const Type &value, TypeHandle type_handle = pvector_type_handle) : base_class(n, value, allocator(type_handle)) { }
pvector(const Type *begin, const Type *end, TypeHandle type_handle = pvector_type_handle) : base_class(begin, end, allocator(type_handle)) { }
#ifdef USE_MOVE_SEMANTICS
pvector(pvector<Type> &&from) NOEXCEPT : base_class(move(from)) {};
pvector<Type> &operator =(pvector<Type> &&from) NOEXCEPT {
base_class::operator =(move(from));
return *this;
}
#endif
pvector<Type> &operator =(const pvector<Type> &copy) {
base_class::operator =(copy);
return *this;
}
pvector<Type> &operator =(pvector<Type> &&from) noexcept {
base_class::operator =(move(from));
return *this;
}
};
#endif // USE_STL_ALLOCATOR

View File

@ -194,7 +194,7 @@ output(ostream &out) const {
/**
* Returns a special zero-valued TypeHandle that is used to indicate no type.
*/
CONSTEXPR TypeHandle TypeHandle::
constexpr TypeHandle TypeHandle::
none() {
return TypeHandle(0);
}
@ -213,7 +213,7 @@ operator bool () const {
*
* See TypeRegistry::find_type_by_id().
*/
CONSTEXPR TypeHandle TypeHandle::
constexpr TypeHandle TypeHandle::
from_index(int index) {
return TypeHandle(index);
}
@ -222,6 +222,6 @@ from_index(int index) {
* Private constructor for initializing a TypeHandle from an index, used by
* none() and by from_index().
*/
CONSTEXPR TypeHandle::
constexpr TypeHandle::
TypeHandle(int index) : _index(index) {
}

View File

@ -78,9 +78,9 @@ class TypedObject;
* that ancestry of a particular type may be queried, and the type name may be
* retrieved for run-time display.
*/
class EXPCL_DTOOL_DTOOLBASE TypeHandle FINAL {
class EXPCL_DTOOL_DTOOLBASE TypeHandle final {
PUBLISHED:
TypeHandle() NOEXCEPT DEFAULT_CTOR;
TypeHandle() noexcept = default;
enum MemoryClass {
MC_singleton,
@ -129,7 +129,7 @@ PUBLISHED:
INLINE int get_index() const;
INLINE void output(ostream &out) const;
CONSTEXPR static TypeHandle none();
constexpr static TypeHandle none();
INLINE operator bool () const;
MAKE_PROPERTY(index, get_index);
@ -142,10 +142,10 @@ public:
void *reallocate_array(void *ptr, size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
void deallocate_array(void *ptr);
CONSTEXPR static TypeHandle from_index(int index);
constexpr static TypeHandle from_index(int index);
private:
CONSTEXPR TypeHandle(int index);
constexpr TypeHandle(int index);
// Only kept temporarily for ABI compatibility.
static TypeHandle _none;

View File

@ -87,9 +87,9 @@
*/
class EXPCL_DTOOL_DTOOLBASE TypedObject : public MemoryBase {
public:
INLINE TypedObject() DEFAULT_CTOR;
INLINE TypedObject(const TypedObject &copy) DEFAULT_CTOR;
INLINE TypedObject &operator = (const TypedObject &copy) DEFAULT_ASSIGN;
INLINE TypedObject() = default;
INLINE TypedObject(const TypedObject &copy) = default;
INLINE TypedObject &operator = (const TypedObject &copy) = default;
PUBLISHED:
// A virtual destructor is just a good idea.

View File

@ -54,24 +54,20 @@ Filename(const Filename &copy) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE Filename::
Filename(string &&filename) NOEXCEPT {
_flags = 0;
(*this) = move(filename);
Filename(string &&filename) noexcept : _flags(0) {
(*this) = std::move(filename);
}
#endif // USE_MOVE_SEMANTICS
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE Filename::
Filename(Filename &&from) NOEXCEPT :
_filename(move(from._filename)),
Filename(Filename &&from) noexcept :
_filename(std::move(from._filename)),
_dirname_end(from._dirname_end),
_basename_start(from._basename_start),
_basename_end(from._basename_end),
@ -81,7 +77,6 @@ Filename(Filename &&from) NOEXCEPT :
_flags(from._flags)
{
}
#endif // USE_MOVE_SEMANTICS
/**
* Creates an empty Filename.
@ -217,28 +212,25 @@ operator = (const Filename &copy) {
return *this;
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE Filename &Filename::
operator = (string &&filename) NOEXCEPT {
_filename = move(filename);
operator = (string &&filename) noexcept {
_filename = std::move(filename);
locate_basename();
locate_extension();
locate_hash();
return *this;
}
#endif // USE_MOVE_SEMANTICS
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE Filename &Filename::
operator = (Filename &&from) NOEXCEPT {
_filename = move(from._filename);
operator = (Filename &&from) noexcept {
_filename = std::move(from._filename);
_dirname_end = from._dirname_end;
_basename_start = from._basename_start;
_basename_end = from._basename_end;
@ -248,7 +240,6 @@ operator = (Filename &&from) NOEXCEPT {
_flags = from._flags;
return *this;
}
#endif // USE_MOVE_SEMANTICS
/**
*

View File

@ -58,11 +58,8 @@ public:
INLINE Filename(const string &filename);
INLINE Filename(const wstring &filename);
INLINE Filename(const Filename &copy);
#ifdef USE_MOVE_SEMANTICS
INLINE Filename(string &&filename) NOEXCEPT;
INLINE Filename(Filename &&from) NOEXCEPT;
#endif
INLINE Filename(string &&filename) noexcept;
INLINE Filename(Filename &&from) noexcept;
PUBLISHED:
INLINE Filename();
@ -106,11 +103,8 @@ PUBLISHED:
INLINE Filename &operator = (const wstring &filename);
INLINE Filename &operator = (const char *filename);
INLINE Filename &operator = (const Filename &copy);
#ifdef USE_MOVE_SEMANTICS
INLINE Filename &operator = (string &&filename) NOEXCEPT;
INLINE Filename &operator = (Filename &&from) NOEXCEPT;
#endif
INLINE Filename &operator = (string &&filename) noexcept;
INLINE Filename &operator = (Filename &&from) noexcept;
// And retrieval is by any of the classic string operations.
INLINE operator const string & () const;

View File

@ -88,7 +88,7 @@ is_debug() const {
* "debug" severities, and these methods are redefined to be static to make it
* more obvious to the compiler.
*/
CONSTEXPR bool NotifyCategory::
constexpr bool NotifyCategory::
is_spam() {
return false;
}
@ -98,7 +98,7 @@ is_spam() {
* "debug" severities, and these methods are redefined to be static to make it
* more obvious to the compiler.
*/
CONSTEXPR bool NotifyCategory::
constexpr bool NotifyCategory::
is_debug() {
return false;
}

View File

@ -55,8 +55,8 @@ PUBLISHED:
INLINE bool is_spam() const;
INLINE bool is_debug() const;
#else
CONSTEXPR static bool is_spam();
CONSTEXPR static bool is_debug();
constexpr static bool is_spam();
constexpr static bool is_debug();
#endif
INLINE bool is_info() const;
INLINE bool is_warning() const;

View File

@ -74,7 +74,7 @@ is_spam() {
}
#else
template<class GetCategory>
CONSTEXPR bool NotifyCategoryProxy<GetCategory>::
constexpr bool NotifyCategoryProxy<GetCategory>::
is_spam() {
return false;
}
@ -92,7 +92,7 @@ is_debug() {
}
#else
template<class GetCategory>
CONSTEXPR bool NotifyCategoryProxy<GetCategory>::
constexpr bool NotifyCategoryProxy<GetCategory>::
is_debug() {
return false;
}

View File

@ -75,8 +75,8 @@ public:
INLINE bool is_spam();
INLINE bool is_debug();
#else
CONSTEXPR static bool is_spam();
CONSTEXPR static bool is_debug();
constexpr static bool is_spam();
constexpr static bool is_debug();
#endif
INLINE bool is_info();
INLINE bool is_warning();

View File

@ -24,9 +24,7 @@
class EXPCL_DTOOL_PRC StreamWrapperBase {
protected:
INLINE StreamWrapperBase();
private:
INLINE StreamWrapperBase(const StreamWrapperBase &copy) DELETED;
INLINE StreamWrapperBase(const StreamWrapperBase &copy) = delete;
PUBLISHED:
INLINE void acquire();

View File

@ -2272,12 +2272,10 @@ DTOOL_CONFIG=[
("DO_PIPELINING", '1', '1'),
("DEFAULT_PATHSEP", '";"', '":"'),
("WORDS_BIGENDIAN", 'UNDEF', 'UNDEF'),
("HAVE_NAMESPACE", '1', '1'),
("HAVE_OPEN_MASK", 'UNDEF', 'UNDEF'),
("HAVE_LOCKF", '1', '1'),
("HAVE_WCHAR_T", '1', '1'),
("HAVE_WSTRING", '1', '1'),
("HAVE_TYPENAME", '1', '1'),
("SIMPLE_STRUCT_POINTERS", '1', 'UNDEF'),
("HAVE_DINKUM", 'UNDEF', 'UNDEF'),
("HAVE_STL_HASH", 'UNDEF', 'UNDEF'),

View File

@ -32,7 +32,7 @@
class EXPCL_PANDABULLET BulletTriangleMesh : public TypedWritableReferenceCount {
PUBLISHED:
BulletTriangleMesh();
~BulletTriangleMesh() DEFAULT_DTOR;
~BulletTriangleMesh() = default;
void add_triangle(const LPoint3 &p0,
const LPoint3 &p1,

View File

@ -479,13 +479,8 @@ INLINE void DisplayRegion::
set_cull_result(PT(CullResult) cull_result, PT(SceneSetup) scene_setup,
Thread *current_thread) {
CDCullWriter cdata(_cycler_cull, true, current_thread);
#ifdef USE_MOVE_SEMANTICS
cdata->_cull_result = move(cull_result);
cdata->_scene_setup = move(scene_setup);
#else
swap(cdata->_cull_result, cull_result);
swap(cdata->_scene_setup, scene_setup);
#endif
}
/**

View File

@ -1538,7 +1538,7 @@ cull_to_bins(GraphicsEngine::Windows wlist, Thread *current_thread) {
}
// Save the results for next frame.
dr->set_cull_result(MOVE(cull_result), MOVE(scene_setup), current_thread);
dr->set_cull_result(move(cull_result), MOVE(scene_setup), current_thread);
}
}
}

View File

@ -52,9 +52,8 @@ class DisplayInformation;
class EXPCL_PANDA_DISPLAY GraphicsPipe : public TypedReferenceCount {
protected:
GraphicsPipe();
private:
GraphicsPipe(const GraphicsPipe &copy) DELETED;
GraphicsPipe &operator = (const GraphicsPipe &copy) DELETED_ASSIGN;
GraphicsPipe(const GraphicsPipe &copy) = delete;
GraphicsPipe &operator = (const GraphicsPipe &copy) = delete;
PUBLISHED:
virtual ~GraphicsPipe();

View File

@ -286,7 +286,7 @@ PUBLISHED:
MAKE_PROPERTY(driver_shader_version_minor, get_driver_shader_version_minor);
bool set_scene(SceneSetup *scene_setup);
virtual SceneSetup *get_scene() const FINAL;
virtual SceneSetup *get_scene() const final;
MAKE_PROPERTY(scene, get_scene, set_scene);
public:

View File

@ -160,7 +160,7 @@ INLINE ostream &operator << (ostream &out, const AsyncFuture &fut) {
/**
* Specific future that collects the results of several futures.
*/
class EXPCL_PANDA_EVENT AsyncGatheringFuture FINAL : public AsyncFuture {
class EXPCL_PANDA_EVENT AsyncGatheringFuture final : public AsyncFuture {
private:
AsyncGatheringFuture(AsyncFuture::Futures futures);

View File

@ -103,8 +103,8 @@ protected:
void jump_to_task_chain(AsyncTaskManager *manager);
DoneStatus unlock_and_do_task();
virtual bool cancel() FINAL;
virtual bool is_task() const FINAL {return true;}
virtual bool cancel() final;
virtual bool is_task() const final {return true;}
virtual bool is_runnable();
virtual DoneStatus do_task();

View File

@ -34,7 +34,7 @@
*/
class EXPCL_PANDA_EVENT EventParameter {
PUBLISHED:
INLINE EventParameter() DEFAULT_CTOR;
INLINE EventParameter() = default;
INLINE EventParameter(nullptr_t) {};
INLINE EventParameter(const TypedWritableReferenceCount *ptr);
INLINE EventParameter(const TypedReferenceCount *ptr);

View File

@ -26,7 +26,7 @@
* This class exists to allow association of a Python function or coroutine
* with the AsyncTaskManager.
*/
class PythonTask FINAL : public AsyncTask {
class PythonTask final : public AsyncTask {
PUBLISHED:
PythonTask(PyObject *function = Py_None, const string &name = string());
virtual ~PythonTask();

View File

@ -33,14 +33,13 @@ NodePointerTo(const NodePointerTo<T> &copy) :
}
#endif // CPPPARSER
#ifdef USE_MOVE_SEMANTICS
#ifndef CPPPARSER
/**
*
*/
template<class T>
INLINE NodePointerTo<T>::
NodePointerTo(NodePointerTo<T> &&from) NOEXCEPT :
NodePointerTo(NodePointerTo<T> &&from) noexcept :
NodePointerToBase<T>((NodePointerToBase<T> &&)from)
{
}
@ -52,12 +51,11 @@ NodePointerTo(NodePointerTo<T> &&from) NOEXCEPT :
*/
template<class T>
INLINE NodePointerTo<T> &NodePointerTo<T>::
operator = (NodePointerTo<T> &&from) NOEXCEPT {
operator = (NodePointerTo<T> &&from) noexcept {
this->reassign(move(from));
return *this;
}
#endif // CPPPARSER
#endif // USE_MOVE_SEMANTICS
#ifndef CPPPARSER
/**
@ -167,14 +165,13 @@ NodeConstPointerTo(const NodeConstPointerTo<T> &copy) :
}
#endif // CPPPARSER
#ifdef USE_MOVE_SEMANTICS
#ifndef CPPPARSER
/**
*
*/
template<class T>
INLINE NodeConstPointerTo<T>::
NodeConstPointerTo(NodePointerTo<T> &&from) NOEXCEPT :
NodeConstPointerTo(NodePointerTo<T> &&from) noexcept :
NodePointerToBase<T>((NodePointerToBase<T> &&)from)
{
}
@ -186,7 +183,7 @@ NodeConstPointerTo(NodePointerTo<T> &&from) NOEXCEPT :
*/
template<class T>
INLINE NodeConstPointerTo<T>::
NodeConstPointerTo(NodeConstPointerTo<T> &&from) NOEXCEPT :
NodeConstPointerTo(NodeConstPointerTo<T> &&from) noexcept :
NodePointerToBase<T>((NodePointerToBase<T> &&)from)
{
}
@ -198,7 +195,7 @@ NodeConstPointerTo(NodeConstPointerTo<T> &&from) NOEXCEPT :
*/
template<class T>
INLINE NodeConstPointerTo<T> &NodeConstPointerTo<T>::
operator = (NodePointerTo<T> &&from) NOEXCEPT {
operator = (NodePointerTo<T> &&from) noexcept {
this->reassign(move(from));
return *this;
}
@ -210,12 +207,11 @@ operator = (NodePointerTo<T> &&from) NOEXCEPT {
*/
template<class T>
INLINE NodeConstPointerTo<T> &NodeConstPointerTo<T>::
operator = (NodeConstPointerTo<T> &&from) NOEXCEPT {
operator = (NodeConstPointerTo<T> &&from) noexcept {
this->reassign(move(from));
return *this;
}
#endif // CPPPARSER
#endif // USE_MOVE_SEMANTICS
#ifndef CPPPARSER
/**

View File

@ -31,11 +31,9 @@ public:
typedef TYPENAME NodePointerToBase<T>::To To;
INLINE NodePointerTo(To *ptr = (To *)NULL);
INLINE NodePointerTo(const NodePointerTo<T> &copy);
INLINE NodePointerTo(NodePointerTo<T> &&from) noexcept;
#ifdef USE_MOVE_SEMANTICS
INLINE NodePointerTo(NodePointerTo<T> &&from) NOEXCEPT;
INLINE NodePointerTo<T> &operator = (NodePointerTo<T> &&from) NOEXCEPT;
#endif
INLINE NodePointerTo<T> &operator = (NodePointerTo<T> &&from) noexcept;
INLINE To &operator *() const;
INLINE To *operator -> () const;
@ -65,13 +63,11 @@ public:
INLINE NodeConstPointerTo(const To *ptr = (const To *)NULL);
INLINE NodeConstPointerTo(const NodePointerTo<T> &copy);
INLINE NodeConstPointerTo(const NodeConstPointerTo<T> &copy);
INLINE NodeConstPointerTo(NodePointerTo<T> &&from) noexcept;
INLINE NodeConstPointerTo(NodeConstPointerTo<T> &&from) noexcept;
#ifdef USE_MOVE_SEMANTICS
INLINE NodeConstPointerTo(NodePointerTo<T> &&from) NOEXCEPT;
INLINE NodeConstPointerTo(NodeConstPointerTo<T> &&from) NOEXCEPT;
INLINE NodeConstPointerTo<T> &operator = (NodePointerTo<T> &&from) NOEXCEPT;
INLINE NodeConstPointerTo<T> &operator = (NodeConstPointerTo<T> &&from) NOEXCEPT;
#endif
INLINE NodeConstPointerTo<T> &operator = (NodePointerTo<T> &&from) noexcept;
INLINE NodeConstPointerTo<T> &operator = (NodeConstPointerTo<T> &&from) noexcept;
INLINE const To &operator *() const;
INLINE const To *operator -> () const;
@ -86,12 +82,12 @@ public:
};
template <class T>
void swap(NodePointerTo<T> &one, NodePointerTo<T> &two) NOEXCEPT {
void swap(NodePointerTo<T> &one, NodePointerTo<T> &two) noexcept {
one.swap(two);
}
template <class T>
void swap(NodeConstPointerTo<T> &one, NodeConstPointerTo<T> &two) NOEXCEPT {
void swap(NodeConstPointerTo<T> &one, NodeConstPointerTo<T> &two) noexcept {
one.swap(two);
}

View File

@ -38,13 +38,12 @@ INLINE NodePointerToBase<T>::
reassign((To *)NULL);
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class T>
INLINE NodePointerToBase<T>::
NodePointerToBase(NodePointerToBase<T> &&from) NOEXCEPT {
NodePointerToBase(NodePointerToBase<T> &&from) noexcept {
_void_ptr = from._void_ptr;
from._void_ptr = (void *)NULL;
}
@ -57,7 +56,7 @@ NodePointerToBase(NodePointerToBase<T> &&from) NOEXCEPT {
*/
template<class T>
INLINE void NodePointerToBase<T>::
reassign(NodePointerToBase<T> &&from) NOEXCEPT {
reassign(NodePointerToBase<T> &&from) noexcept {
To *old_ptr = (To *)this->_void_ptr;
this->_void_ptr = from._void_ptr;
@ -68,7 +67,6 @@ reassign(NodePointerToBase<T> &&from) NOEXCEPT {
node_unref_delete(old_ptr);
}
}
#endif // USE_MOVE_SEMANTICS
/**
* This is the main work of the NodePointerTo family. When the pointer is

View File

@ -36,11 +36,9 @@ protected:
INLINE NodePointerToBase(To *ptr);
INLINE NodePointerToBase(const NodePointerToBase<T> &copy);
INLINE ~NodePointerToBase();
INLINE NodePointerToBase(NodePointerToBase<T> &&from) noexcept;
#ifdef USE_MOVE_SEMANTICS
INLINE NodePointerToBase(NodePointerToBase<T> &&from) NOEXCEPT;
INLINE void reassign(NodePointerToBase<To> &&from) NOEXCEPT;
#endif
INLINE void reassign(NodePointerToBase<To> &&from) noexcept;
void reassign(To *ptr);
INLINE void reassign(const NodePointerToBase<To> &copy);

View File

@ -16,7 +16,7 @@
*/
template<class T>
ALWAYS_INLINE PointerTo<T>::
PointerTo(To *ptr) NOEXCEPT : PointerToBase<T>(ptr) {
PointerTo(To *ptr) noexcept : PointerToBase<T>(ptr) {
}
/**
@ -29,13 +29,12 @@ PointerTo(const PointerTo<T> &copy) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class T>
INLINE PointerTo<T>::
PointerTo(PointerTo<T> &&from) NOEXCEPT :
PointerTo(PointerTo<T> &&from) noexcept :
PointerToBase<T>(move(from))
{
}
@ -45,18 +44,17 @@ PointerTo(PointerTo<T> &&from) NOEXCEPT :
*/
template<class T>
INLINE PointerTo<T> &PointerTo<T>::
operator = (PointerTo<T> &&from) NOEXCEPT {
operator = (PointerTo<T> &&from) noexcept {
this->reassign(move(from));
return *this;
}
#endif // USE_MOVE_SEMANTICS
/**
*
*/
template<class T>
CONSTEXPR TYPENAME PointerTo<T>::To &PointerTo<T>::
operator *() const NOEXCEPT {
constexpr TYPENAME PointerTo<T>::To &PointerTo<T>::
operator *() const noexcept {
return *((To *)(this->_void_ptr));
}
@ -64,8 +62,8 @@ operator *() const NOEXCEPT {
*
*/
template<class T>
CONSTEXPR TYPENAME PointerTo<T>::To *PointerTo<T>::
operator -> () const NOEXCEPT {
constexpr TYPENAME PointerTo<T>::To *PointerTo<T>::
operator -> () const noexcept {
return (To *)(this->_void_ptr);
}
@ -76,8 +74,8 @@ operator -> () const NOEXCEPT {
* goes because either will be correct.
*/
template<class T>
CONSTEXPR PointerTo<T>::
operator T * () const NOEXCEPT {
constexpr PointerTo<T>::
operator T * () const noexcept {
return (To *)(this->_void_ptr);
}
@ -99,8 +97,8 @@ cheat() {
* compiler problems, particularly for implicit upcasts.
*/
template<class T>
CONSTEXPR TYPENAME PointerTo<T>::To *PointerTo<T>::
p() const NOEXCEPT {
constexpr TYPENAME PointerTo<T>::To *PointerTo<T>::
p() const noexcept {
return (To *)(this->_void_ptr);
}
@ -129,7 +127,7 @@ operator = (const PointerTo<T> &copy) {
*/
template<class T>
ALWAYS_INLINE ConstPointerTo<T>::
ConstPointerTo(const TYPENAME ConstPointerTo<T>::To *ptr) NOEXCEPT :
ConstPointerTo(const TYPENAME ConstPointerTo<T>::To *ptr) noexcept :
PointerToBase<T>((TYPENAME ConstPointerTo<T>::To *)ptr)
{
}
@ -154,13 +152,12 @@ ConstPointerTo(const ConstPointerTo<T> &copy) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class T>
INLINE ConstPointerTo<T>::
ConstPointerTo(PointerTo<T> &&from) NOEXCEPT :
ConstPointerTo(PointerTo<T> &&from) noexcept :
PointerToBase<T>(move(from))
{
}
@ -170,7 +167,7 @@ ConstPointerTo(PointerTo<T> &&from) NOEXCEPT :
*/
template<class T>
INLINE ConstPointerTo<T>::
ConstPointerTo(ConstPointerTo<T> &&from) NOEXCEPT :
ConstPointerTo(ConstPointerTo<T> &&from) noexcept :
PointerToBase<T>(move(from))
{
}
@ -180,7 +177,7 @@ ConstPointerTo(ConstPointerTo<T> &&from) NOEXCEPT :
*/
template<class T>
INLINE ConstPointerTo<T> &ConstPointerTo<T>::
operator = (PointerTo<T> &&from) NOEXCEPT {
operator = (PointerTo<T> &&from) noexcept {
this->reassign(move(from));
return *this;
}
@ -190,18 +187,17 @@ operator = (PointerTo<T> &&from) NOEXCEPT {
*/
template<class T>
INLINE ConstPointerTo<T> &ConstPointerTo<T>::
operator = (ConstPointerTo<T> &&from) NOEXCEPT {
operator = (ConstPointerTo<T> &&from) noexcept {
this->reassign(move(from));
return *this;
}
#endif // USE_MOVE_SEMANTICS
/**
*
*/
template<class T>
CONSTEXPR const TYPENAME ConstPointerTo<T>::To &ConstPointerTo<T>::
operator *() const NOEXCEPT {
constexpr const TYPENAME ConstPointerTo<T>::To &ConstPointerTo<T>::
operator *() const noexcept {
return *((To *)(this->_void_ptr));
}
@ -209,8 +205,8 @@ operator *() const NOEXCEPT {
*
*/
template<class T>
CONSTEXPR const TYPENAME ConstPointerTo<T>::To *ConstPointerTo<T>::
operator -> () const NOEXCEPT {
constexpr const TYPENAME ConstPointerTo<T>::To *ConstPointerTo<T>::
operator -> () const noexcept {
return (To *)(this->_void_ptr);
}
@ -221,8 +217,8 @@ operator -> () const NOEXCEPT {
* don't care which way it goes because either will be correct.
*/
template<class T>
CONSTEXPR ConstPointerTo<T>::
operator const T * () const NOEXCEPT {
constexpr ConstPointerTo<T>::
operator const T * () const noexcept {
return (To *)(this->_void_ptr);
}
@ -244,8 +240,8 @@ cheat() {
* around compiler problems, particularly for implicit upcasts.
*/
template<class T>
CONSTEXPR const TYPENAME ConstPointerTo<T>::To *ConstPointerTo<T>::
p() const NOEXCEPT {
constexpr const TYPENAME ConstPointerTo<T>::To *ConstPointerTo<T>::
p() const noexcept {
return (To *)(this->_void_ptr);
}

View File

@ -70,20 +70,18 @@ class PointerTo : public PointerToBase<T> {
public:
typedef TYPENAME PointerToBase<T>::To To;
PUBLISHED:
ALWAYS_INLINE_CONSTEXPR PointerTo() NOEXCEPT DEFAULT_CTOR;
ALWAYS_INLINE PointerTo(To *ptr) NOEXCEPT;
ALWAYS_INLINE constexpr PointerTo() noexcept = default;
ALWAYS_INLINE PointerTo(To *ptr) noexcept;
INLINE PointerTo(const PointerTo<T> &copy);
public:
#ifdef USE_MOVE_SEMANTICS
INLINE PointerTo(PointerTo<T> &&from) NOEXCEPT;
INLINE PointerTo<T> &operator = (PointerTo<T> &&from) NOEXCEPT;
#endif
INLINE PointerTo(PointerTo<T> &&from) noexcept;
INLINE PointerTo<T> &operator = (PointerTo<T> &&from) noexcept;
CONSTEXPR To &operator *() const NOEXCEPT;
CONSTEXPR To *operator -> () const NOEXCEPT;
constexpr To &operator *() const noexcept;
constexpr To *operator -> () const noexcept;
// MSVC.NET 2005 insists that we use T *, and not To *, here.
CONSTEXPR operator T *() const NOEXCEPT;
constexpr operator T *() const noexcept;
INLINE T *&cheat();
@ -100,7 +98,7 @@ PUBLISHED:
// the DCAST macro defined in typedObject.h instead, e.g. DCAST(MyType,
// ptr). This provides a clean downcast that doesn't require .p() or any
// double-casting, and it can be run-time checked for correctness.
CONSTEXPR To *p() const NOEXCEPT;
constexpr To *p() const noexcept;
INLINE PointerTo<T> &operator = (To *ptr);
INLINE PointerTo<T> &operator = (const PointerTo<T> &copy);
@ -133,27 +131,25 @@ class ConstPointerTo : public PointerToBase<T> {
public:
typedef TYPENAME PointerToBase<T>::To To;
PUBLISHED:
ALWAYS_INLINE_CONSTEXPR ConstPointerTo() NOEXCEPT DEFAULT_CTOR;
ALWAYS_INLINE ConstPointerTo(const To *ptr) NOEXCEPT;
ALWAYS_INLINE constexpr ConstPointerTo() noexcept = default;
ALWAYS_INLINE ConstPointerTo(const To *ptr) noexcept;
INLINE ConstPointerTo(const PointerTo<T> &copy);
INLINE ConstPointerTo(const ConstPointerTo<T> &copy);
public:
#ifdef USE_MOVE_SEMANTICS
INLINE ConstPointerTo(PointerTo<T> &&from) NOEXCEPT;
INLINE ConstPointerTo(ConstPointerTo<T> &&from) NOEXCEPT;
INLINE ConstPointerTo<T> &operator = (PointerTo<T> &&from) NOEXCEPT;
INLINE ConstPointerTo<T> &operator = (ConstPointerTo<T> &&from) NOEXCEPT;
#endif
INLINE ConstPointerTo(PointerTo<T> &&from) noexcept;
INLINE ConstPointerTo(ConstPointerTo<T> &&from) noexcept;
INLINE ConstPointerTo<T> &operator = (PointerTo<T> &&from) noexcept;
INLINE ConstPointerTo<T> &operator = (ConstPointerTo<T> &&from) noexcept;
CONSTEXPR const To &operator *() const NOEXCEPT;
CONSTEXPR const To *operator -> () const NOEXCEPT;
CONSTEXPR operator const T *() const NOEXCEPT;
constexpr const To &operator *() const noexcept;
constexpr const To *operator -> () const noexcept;
constexpr operator const T *() const noexcept;
INLINE const T *&cheat();
PUBLISHED:
CONSTEXPR const To *p() const NOEXCEPT;
constexpr const To *p() const noexcept;
INLINE ConstPointerTo<T> &operator = (const To *ptr);
INLINE ConstPointerTo<T> &operator = (const PointerTo<T> &copy);
@ -173,12 +169,12 @@ PUBLISHED:
// PointerTo objects without incurring the cost of unnecessary reference count
// changes. The performance difference is dramatic!
template <class T>
void swap(PointerTo<T> &one, PointerTo<T> &two) NOEXCEPT {
void swap(PointerTo<T> &one, PointerTo<T> &two) noexcept {
one.swap(two);
}
template <class T>
void swap(ConstPointerTo<T> &one, ConstPointerTo<T> &two) NOEXCEPT {
void swap(ConstPointerTo<T> &one, ConstPointerTo<T> &two) noexcept {
one.swap(two);
}

View File

@ -79,20 +79,17 @@ PointerToArray(const Element *begin, const Element *end, TypeHandle type_handle)
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class Element>
INLINE PointerToArray<Element>::
PointerToArray(PointerToArray<Element> &&from) NOEXCEPT :
PointerToArray(PointerToArray<Element> &&from) noexcept :
PointerToArrayBase<Element>(move(from)),
_type_handle(from._type_handle)
{
}
#endif // USE_MOVE_SEMANTICS
#ifdef USE_MOVE_SEMANTICS
/**
* Initializes the PTA from a vector.
*/
@ -103,7 +100,6 @@ PointerToArray(pvector<Element> &&from, TypeHandle type_handle) :
_type_handle(type_handle)
{
}
#endif // USE_MOVE_SEMANTICS
/**
*
@ -628,18 +624,16 @@ operator = (const PointerToArray<Element> &copy) {
return *this;
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class Element>
INLINE PointerToArray<Element> &PointerToArray<Element>::
operator = (PointerToArray<Element> &&from) NOEXCEPT {
operator = (PointerToArray<Element> &&from) noexcept {
_type_handle = from._type_handle;
((PointerToArray<Element> *)this)->reassign(move(from));
return *this;
}
#endif // USE_MOVE_SEMANTICS
/**
* To empty the PTA, use the clear() method, since assignment to NULL is
@ -697,33 +691,28 @@ ConstPointerToArray(const ConstPointerToArray<Element> &copy) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class Element>
INLINE ConstPointerToArray<Element>::
ConstPointerToArray(PointerToArray<Element> &&from) NOEXCEPT :
ConstPointerToArray(PointerToArray<Element> &&from) noexcept :
PointerToArrayBase<Element>(move(from)),
_type_handle(from._type_handle)
{
}
#endif // USE_MOVE_SEMANTICS
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class Element>
INLINE ConstPointerToArray<Element>::
ConstPointerToArray(ConstPointerToArray<Element> &&from) NOEXCEPT :
ConstPointerToArray(ConstPointerToArray<Element> &&from) noexcept :
PointerToArrayBase<Element>(move(from)),
_type_handle(from._type_handle)
{
}
#endif // USE_MOVE_SEMANTICS
#ifdef USE_MOVE_SEMANTICS
/**
* Initializes the PTA from a vector.
*/
@ -734,7 +723,6 @@ ConstPointerToArray(pvector<Element> &&from, TypeHandle type_handle) :
_type_handle(type_handle)
{
}
#endif // USE_MOVE_SEMANTICS
/**
*
@ -1090,31 +1078,27 @@ operator = (const ConstPointerToArray<Element> &copy) {
return *this;
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class Element>
INLINE ConstPointerToArray<Element> &ConstPointerToArray<Element>::
operator = (PointerToArray<Element> &&from) NOEXCEPT {
operator = (PointerToArray<Element> &&from) noexcept {
_type_handle = from._type_handle;
((ConstPointerToArray<Element> *)this)->reassign(move(from));
return *this;
}
#endif // USE_MOVE_SEMANTICS
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class Element>
INLINE ConstPointerToArray<Element> &ConstPointerToArray<Element>::
operator = (ConstPointerToArray<Element> &&from) NOEXCEPT {
operator = (ConstPointerToArray<Element> &&from) noexcept {
_type_handle = from._type_handle;
((ConstPointerToArray<Element> *)this)->reassign(move(from));
return *this;
}
#endif // USE_MOVE_SEMANTICS
/**
* To empty the PTA, use the clear() method, since assignment to NULL is

View File

@ -138,11 +138,8 @@ public:
INLINE PointerToArray(size_type n, const Element &value, TypeHandle type_handle = get_type_handle(Element));
INLINE PointerToArray(const Element *begin, const Element *end, TypeHandle type_handle = get_type_handle(Element));
INLINE PointerToArray(const PointerToArray<Element> &copy);
#ifdef USE_MOVE_SEMANTICS
INLINE PointerToArray(PointerToArray<Element> &&from) NOEXCEPT;
INLINE PointerToArray(PointerToArray<Element> &&from) noexcept;
INLINE explicit PointerToArray(pvector<Element> &&from, TypeHandle type_handle = get_type_handle(Element));
#endif
public:
// Duplicating the interface of vector. The following member functions are
@ -224,11 +221,8 @@ public:
operator = (ReferenceCountedVector<Element> *ptr);
INLINE PointerToArray<Element> &
operator = (const PointerToArray<Element> &copy);
#ifdef USE_MOVE_SEMANTICS
INLINE PointerToArray<Element> &
operator = (PointerToArray<Element> &&from) NOEXCEPT;
#endif
operator = (PointerToArray<Element> &&from) noexcept;
INLINE void clear();
@ -299,12 +293,9 @@ PUBLISHED:
INLINE ConstPointerToArray(const Element *begin, const Element *end, TypeHandle type_handle = get_type_handle(Element));
INLINE ConstPointerToArray(const PointerToArray<Element> &copy);
INLINE ConstPointerToArray(const ConstPointerToArray<Element> &copy);
#ifdef USE_MOVE_SEMANTICS
INLINE ConstPointerToArray(PointerToArray<Element> &&from) NOEXCEPT;
INLINE ConstPointerToArray(ConstPointerToArray<Element> &&from) NOEXCEPT;
INLINE ConstPointerToArray(PointerToArray<Element> &&from) noexcept;
INLINE ConstPointerToArray(ConstPointerToArray<Element> &&from) noexcept;
INLINE explicit ConstPointerToArray(pvector<Element> &&from, TypeHandle type_handle = get_type_handle(Element));
#endif
// Duplicating the interface of vector.
@ -358,13 +349,10 @@ PUBLISHED:
operator = (const PointerToArray<Element> &copy);
INLINE ConstPointerToArray<Element> &
operator = (const ConstPointerToArray<Element> &copy);
#ifdef USE_MOVE_SEMANTICS
INLINE ConstPointerToArray<Element> &
operator = (PointerToArray<Element> &&from) NOEXCEPT;
operator = (PointerToArray<Element> &&from) noexcept;
INLINE ConstPointerToArray<Element> &
operator = (ConstPointerToArray<Element> &&from) NOEXCEPT;
#endif
operator = (ConstPointerToArray<Element> &&from) noexcept;
INLINE void clear();

View File

@ -132,17 +132,15 @@ PointerToArrayBase(const PointerToArrayBase<Element> &copy) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class Element>
INLINE PointerToArrayBase<Element>::
PointerToArrayBase(PointerToArrayBase<Element> &&from) NOEXCEPT :
PointerToArrayBase(PointerToArrayBase<Element> &&from) noexcept :
PointerToBase<ReferenceCountedVector<Element> >(move(from))
{
}
#endif // USE_MOVE_SEMANTICS
/**
*

View File

@ -73,10 +73,7 @@ public:
protected:
INLINE PointerToArrayBase(ReferenceCountedVector<Element> *ptr);
INLINE PointerToArrayBase(const PointerToArrayBase<Element> &copy);
#ifdef USE_MOVE_SEMANTICS
INLINE PointerToArrayBase(PointerToArrayBase<Element> &&from) NOEXCEPT;
#endif
INLINE PointerToArrayBase(PointerToArrayBase<Element> &&from) noexcept;
PUBLISHED:
INLINE ~PointerToArrayBase();

View File

@ -51,13 +51,12 @@ INLINE PointerToBase<T>::
}
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
template<class T>
INLINE PointerToBase<T>::
PointerToBase(PointerToBase<T> &&from) NOEXCEPT {
PointerToBase(PointerToBase<T> &&from) noexcept {
_void_ptr = from._void_ptr;
from._void_ptr = (void *)NULL;
}
@ -70,7 +69,7 @@ PointerToBase(PointerToBase<T> &&from) NOEXCEPT {
*/
template<class T>
INLINE void PointerToBase<T>::
reassign(PointerToBase<T> &&from) NOEXCEPT {
reassign(PointerToBase<T> &&from) noexcept {
// Protect against self-move-assignment.
if (from._void_ptr != this->_void_ptr) {
To *old_ptr = (To *)this->_void_ptr;
@ -84,7 +83,6 @@ reassign(PointerToBase<T> &&from) NOEXCEPT {
}
}
}
#endif // USE_MOVE_SEMANTICS
/**
* This is the main work of the PointerTo family. When the pointer is

View File

@ -31,18 +31,15 @@ public:
typedef T To;
protected:
ALWAYS_INLINE_CONSTEXPR PointerToBase() NOEXCEPT DEFAULT_CTOR;
ALWAYS_INLINE constexpr PointerToBase() noexcept = default;
INLINE PointerToBase(To *ptr);
INLINE PointerToBase(const PointerToBase<T> &copy);
INLINE PointerToBase(PointerToBase<T> &&from) noexcept;
INLINE ~PointerToBase();
#ifdef USE_MOVE_SEMANTICS
INLINE PointerToBase(PointerToBase<T> &&from) NOEXCEPT;
INLINE void reassign(PointerToBase<To> &&from) NOEXCEPT;
#endif
INLINE void reassign(To *ptr);
INLINE void reassign(const PointerToBase<To> &copy);
INLINE void reassign(PointerToBase<To> &&from) noexcept;
INLINE void update_type(To *ptr);

View File

@ -14,8 +14,8 @@
/**
*
*/
CONSTEXPR PointerToVoid::
PointerToVoid() NOEXCEPT : _void_ptr(nullptr) {
constexpr PointerToVoid::
PointerToVoid() noexcept : _void_ptr(nullptr) {
}
/**
@ -30,7 +30,7 @@ PointerToVoid() NOEXCEPT : _void_ptr(nullptr) {
* Returns true if the PointerTo is a NULL pointer, false otherwise. (Direct
* comparison to a NULL pointer also works.)
*/
CONSTEXPR bool PointerToVoid::
constexpr bool PointerToVoid::
is_null() const {
return _void_ptr == nullptr;
}
@ -82,7 +82,7 @@ operator != (const PointerToVoid &other) const {
* For internal use only. Use the global swap() function instead.
*/
INLINE void PointerToVoid::
swap(PointerToVoid &other) NOEXCEPT {
swap(PointerToVoid &other) noexcept {
AtomicAdjust::Pointer temp = _void_ptr;
_void_ptr = other._void_ptr;
other._void_ptr = temp;

View File

@ -32,14 +32,14 @@
*/
class EXPCL_PANDAEXPRESS PointerToVoid : public MemoryBase {
protected:
CONSTEXPR PointerToVoid() NOEXCEPT;
constexpr PointerToVoid() noexcept;
//INLINE ~PointerToVoid();
private:
PointerToVoid(const PointerToVoid &copy) DELETED;
PointerToVoid(const PointerToVoid &copy) = delete;
PUBLISHED:
CONSTEXPR bool is_null() const;
constexpr bool is_null() const;
INLINE size_t get_hash() const;
public:
@ -51,7 +51,7 @@ public:
INLINE bool operator == (const PointerToVoid &other) const;
INLINE bool operator != (const PointerToVoid &other) const;
INLINE void swap(PointerToVoid &other) NOEXCEPT;
INLINE void swap(PointerToVoid &other) noexcept;
protected:
// Within the PointerToVoid class, we only store a void pointer. This is

View File

@ -63,7 +63,7 @@ WeakPointerToBase(const WeakPointerToBase<T> &copy) {
*/
template<class T>
INLINE WeakPointerToBase<T>::
WeakPointerToBase(WeakPointerToBase<T> &&from) NOEXCEPT {
WeakPointerToBase(WeakPointerToBase<T> &&from) noexcept {
// Protect against self-move-assignment.
if (from._void_ptr != this->_void_ptr) {
WeakReferenceList *old_ref = (To *)this->_weak_ref;
@ -163,7 +163,7 @@ reassign(const WeakPointerToBase<To> &copy) {
*/
template<class T>
INLINE void WeakPointerToBase<T>::
reassign(WeakPointerToBase<To> &&from) NOEXCEPT {
reassign(WeakPointerToBase<To> &&from) noexcept {
// Protect against self-move-assignment.
if (from._void_ptr != this->_void_ptr) {
WeakReferenceList *old_ref = (WeakReferenceList *)this->_weak_ref;

View File

@ -31,13 +31,13 @@ protected:
INLINE WeakPointerToBase(To *ptr);
INLINE WeakPointerToBase(const PointerToBase<T> &copy);
INLINE WeakPointerToBase(const WeakPointerToBase<T> &copy);
INLINE WeakPointerToBase(WeakPointerToBase<T> &&from) NOEXCEPT;
INLINE WeakPointerToBase(WeakPointerToBase<T> &&from) noexcept;
INLINE ~WeakPointerToBase();
void reassign(To *ptr);
INLINE void reassign(const PointerToBase<To> &copy);
INLINE void reassign(const WeakPointerToBase<To> &copy);
INLINE void reassign(WeakPointerToBase<To> &&from) NOEXCEPT;
INLINE void reassign(WeakPointerToBase<To> &&from) noexcept;
INLINE void update_type(To *ptr);

View File

@ -25,7 +25,7 @@ class CLP(GraphicsStateGuardian);
/**
* xyz
*/
class EXPCL_GL CLP(CgShaderContext) FINAL : public ShaderContext {
class EXPCL_GL CLP(CgShaderContext) final : public ShaderContext {
public:
friend class CLP(GraphicsStateGuardian);

View File

@ -26,7 +26,7 @@ class CLP(GraphicsStateGuardian);
/**
* xyz
*/
class EXPCL_GL CLP(ShaderContext) FINAL : public ShaderContext {
class EXPCL_GL CLP(ShaderContext) final : public ShaderContext {
public:
friend class CLP(GraphicsStateGuardian);

View File

@ -42,7 +42,7 @@ public:
#endif
#ifdef OPENGLES_1
static CONSTEXPR bool needs_barrier(GLbitfield barrier) { return false; };
static constexpr bool needs_barrier(GLbitfield barrier) { return false; };
#else
bool needs_barrier(GLbitfield barrier);
void mark_incoherent(bool wrote);

View File

@ -443,17 +443,15 @@ CacheKey(const CacheKey &copy) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE Geom::CacheKey::
CacheKey(CacheKey &&from) NOEXCEPT :
CacheKey(CacheKey &&from) noexcept :
_source_data(move(from._source_data)),
_modifier(move(from._modifier))
{
}
#endif // USE_MOVE_SEMANTICS
/**
* Provides a unique ordering within the map.
@ -493,17 +491,15 @@ CacheEntry(Geom *source, const Geom::CacheKey &key) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE Geom::CacheEntry::
CacheEntry(Geom *source, Geom::CacheKey &&key) NOEXCEPT :
CacheEntry(Geom *source, Geom::CacheKey &&key) noexcept :
_source(source),
_key(move(key))
{
}
#endif // USE_MOVE_SEMANTICS
/**
*

View File

@ -256,9 +256,8 @@ public:
INLINE CacheKey(const GeomVertexData *source_data,
const GeomMunger *modifier);
INLINE CacheKey(const CacheKey &copy);
#ifdef USE_MOVE_SEMANTICS
INLINE CacheKey(CacheKey &&from) NOEXCEPT;
#endif
INLINE CacheKey(CacheKey &&from) noexcept;
INLINE bool operator < (const CacheKey &other) const;
CPT(GeomVertexData) _source_data;
@ -271,9 +270,8 @@ public:
const GeomVertexData *source_data,
const GeomMunger *modifier);
INLINE CacheEntry(Geom *source, const CacheKey &key);
#ifdef USE_MOVE_SEMANTICS
INLINE CacheEntry(Geom *source, CacheKey &&key) NOEXCEPT;
#endif
INLINE CacheEntry(Geom *source, CacheKey &&key) noexcept;
ALLOC_DELETED_CHAIN(CacheEntry);
virtual void evict_callback();
@ -406,14 +404,13 @@ class EXPCL_PANDA_GOBJ GeomPipelineReader : public GeomEnums {
public:
INLINE GeomPipelineReader(Thread *current_thread);
INLINE GeomPipelineReader(const Geom *object, Thread *current_thread);
private:
GeomPipelineReader(const GeomPipelineReader &copy) DELETED;
GeomPipelineReader &operator = (const GeomPipelineReader &copy) DELETED_ASSIGN;
public:
GeomPipelineReader(const GeomPipelineReader &copy) = delete;
INLINE ~GeomPipelineReader();
ALLOC_DELETED_CHAIN(GeomPipelineReader);
GeomPipelineReader &operator = (const GeomPipelineReader &copy) = delete;
INLINE void set_object(const Geom *object);
INLINE const Geom *get_object() const;
INLINE Thread *get_current_thread() const;

View File

@ -147,12 +147,9 @@ munge_geom(CPT(Geom) &geom, CPT(GeomVertexData) &data,
// Record the new result in the cache.
if (entry == (Geom::CacheEntry *)NULL) {
// Create a new entry for the result.
#ifdef USE_MOVE_SEMANTICS
// We don't need the key anymore, move the pointers into the CacheEntry.
entry = new Geom::CacheEntry(orig_geom, move(key));
#else
entry = new Geom::CacheEntry(orig_geom, key);
#endif
{
LightMutexHolder holder(orig_geom->_cache_lock);
bool inserted = orig_geom->_cache.insert(Geom::Cache::value_type(&entry->_key, entry)).second;

View File

@ -351,14 +351,13 @@ private:
class EXPCL_PANDA_GOBJ GeomPrimitivePipelineReader : public GeomEnums {
public:
INLINE GeomPrimitivePipelineReader(CPT(GeomPrimitive) object, Thread *current_thread);
private:
GeomPrimitivePipelineReader(const GeomPrimitivePipelineReader &copy) DELETED;
GeomPrimitivePipelineReader &operator = (const GeomPrimitivePipelineReader &copy) DELETED_ASSIGN;
public:
GeomPrimitivePipelineReader(const GeomPrimitivePipelineReader &copy) = delete;
INLINE ~GeomPrimitivePipelineReader();
ALLOC_DELETED_CHAIN(GeomPrimitivePipelineReader);
GeomPrimitivePipelineReader &operator = (const GeomPrimitivePipelineReader &copy) = delete;
INLINE const GeomPrimitive *get_object() const;
INLINE Thread *get_current_thread() const;

View File

@ -239,7 +239,7 @@ CData(UsageHint usage_hint) :
*
*/
INLINE GeomVertexArrayData::CData::
CData(GeomVertexArrayData::CData &&from) NOEXCEPT :
CData(GeomVertexArrayData::CData &&from) noexcept :
_usage_hint(move(from._usage_hint)),
_buffer(move(from._buffer)),
_modified(move(from._modified)),

View File

@ -151,7 +151,7 @@ private:
class EXPCL_PANDA_GOBJ CData : public CycleData {
public:
INLINE CData(UsageHint usage_hint = UH_unspecified);
INLINE CData(CData &&from) NOEXCEPT;
INLINE CData(CData &&from) noexcept;
INLINE CData(const CData &copy);
INLINE void operator = (const CData &copy);

View File

@ -52,7 +52,7 @@ GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
_divisor(0),
_columns_unsorted(false)
{
add_column(MOVE(name0), num_components0, numeric_type0, contents0);
add_column(move(name0), num_components0, numeric_type0, contents0);
}
/**
@ -72,8 +72,8 @@ GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
_divisor(0),
_columns_unsorted(false)
{
add_column(MOVE(name0), num_components0, numeric_type0, contents0);
add_column(MOVE(name1), num_components1, numeric_type1, contents1);
add_column(move(name0), num_components0, numeric_type0, contents0);
add_column(move(name1), num_components1, numeric_type1, contents1);
}
/**
@ -96,9 +96,9 @@ GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
_divisor(0),
_columns_unsorted(false)
{
add_column(MOVE(name0), num_components0, numeric_type0, contents0);
add_column(MOVE(name1), num_components1, numeric_type1, contents1);
add_column(MOVE(name2), num_components2, numeric_type2, contents2);
add_column(move(name0), num_components0, numeric_type0, contents0);
add_column(move(name1), num_components1, numeric_type1, contents1);
add_column(move(name2), num_components2, numeric_type2, contents2);
}
/**
@ -124,10 +124,10 @@ GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
_divisor(0),
_columns_unsorted(false)
{
add_column(MOVE(name0), num_components0, numeric_type0, contents0);
add_column(MOVE(name1), num_components1, numeric_type1, contents1);
add_column(MOVE(name2), num_components2, numeric_type2, contents2);
add_column(MOVE(name3), num_components3, numeric_type3, contents3);
add_column(move(name0), num_components0, numeric_type0, contents0);
add_column(move(name1), num_components1, numeric_type1, contents1);
add_column(move(name2), num_components2, numeric_type2, contents2);
add_column(move(name3), num_components3, numeric_type3, contents3);
}
/**
@ -219,7 +219,7 @@ add_column(CPT_InternalName name, int num_components,
start = _total_bytes;
}
return add_column(GeomVertexColumn(MOVE(name), num_components, numeric_type, contents,
return add_column(GeomVertexColumn(move(name), num_components, numeric_type, contents,
start, column_alignment));
}

View File

@ -44,7 +44,7 @@ class BamReader;
* "normal", "texcoord", and "color"; other kinds of data may be piggybacked
* into the data record simply by choosing a unique name.
*/
class EXPCL_PANDA_GOBJ GeomVertexArrayFormat FINAL : public TypedWritableReferenceCount, public GeomEnums {
class EXPCL_PANDA_GOBJ GeomVertexArrayFormat final : public TypedWritableReferenceCount, public GeomEnums {
PUBLISHED:
GeomVertexArrayFormat();
GeomVertexArrayFormat(const GeomVertexArrayFormat &copy);

View File

@ -28,7 +28,7 @@ GeomVertexColumn(CPT_InternalName name, int num_components,
NumericType numeric_type, Contents contents,
int start, int column_alignment, int num_elements,
int element_stride) :
_name(MOVE(name)),
_name(std::move(name)),
_num_components(num_components),
_numeric_type(numeric_type),
_contents(contents),

View File

@ -342,7 +342,7 @@ private:
}
};
class Packer_nativedouble_3 FINAL : public Packer_float64_3 {
class Packer_nativedouble_3 final : public Packer_float64_3 {
public:
virtual const LVecBase3d &get_data3d(const unsigned char *pointer);
@ -351,7 +351,7 @@ private:
}
};
class Packer_point_nativedouble_2 FINAL : public Packer_point_float64_2 {
class Packer_point_nativedouble_2 final : public Packer_point_float64_2 {
public:
virtual const LVecBase2d &get_data2d(const unsigned char *pointer);
@ -360,7 +360,7 @@ private:
}
};
class Packer_point_nativedouble_3 FINAL : public Packer_point_float64_3 {
class Packer_point_nativedouble_3 final : public Packer_point_float64_3 {
public:
virtual const LVecBase3d &get_data3d(const unsigned char *pointer);
@ -378,7 +378,7 @@ private:
}
};
class Packer_argb_packed FINAL : public Packer_color {
class Packer_argb_packed final : public Packer_color {
public:
virtual const LVecBase4f &get_data4f(const unsigned char *pointer);
virtual void set_data4f(unsigned char *pointer, const LVecBase4f &value);
@ -388,7 +388,7 @@ private:
}
};
class Packer_rgba_uint8_4 FINAL : public Packer_color {
class Packer_rgba_uint8_4 final : public Packer_color {
public:
virtual const LVecBase4f &get_data4f(const unsigned char *pointer);
virtual void set_data4f(unsigned char *pointer, const LVecBase4f &value);
@ -408,7 +408,7 @@ private:
}
};
class Packer_rgba_nativefloat_4 FINAL : public Packer_rgba_float32_4 {
class Packer_rgba_nativefloat_4 final : public Packer_rgba_float32_4 {
public:
virtual const LVecBase4f &get_data4f(const unsigned char *pointer);
@ -417,7 +417,7 @@ private:
}
};
class Packer_uint16_1 FINAL : public Packer {
class Packer_uint16_1 final : public Packer {
public:
virtual int get_data1i(const unsigned char *pointer);
virtual void set_data1i(unsigned char *pointer, int value);

View File

@ -519,16 +519,14 @@ CacheKey(const CacheKey &copy) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE GeomVertexData::CacheKey::
CacheKey(CacheKey &&from) NOEXCEPT :
_modifier(move(from._modifier))
CacheKey(CacheKey &&from) noexcept :
_modifier(std::move(from._modifier))
{
}
#endif // USE_MOVE_SEMANTICS
/**
* Provides a unique ordering within the set.
@ -558,17 +556,15 @@ CacheEntry(GeomVertexData *source, const CacheKey &key) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE GeomVertexData::CacheEntry::
CacheEntry(GeomVertexData *source, CacheKey &&key) NOEXCEPT :
CacheEntry(GeomVertexData *source, CacheKey &&key) noexcept :
_source(source),
_key(move(key))
_key(std::move(key))
{
}
#endif // USE_MOVE_SEMANTICS
/**
*

View File

@ -760,12 +760,9 @@ convert_to(const GeomVertexFormat *new_format) const {
// Record the new result in the cache.
if (entry == (CacheEntry *)NULL) {
// Create a new entry for the result.
#ifdef USE_MOVE_SEMANTICS
// We don't need the key anymore, move the pointers into the CacheEntry.
entry = new CacheEntry((GeomVertexData *)this, move(key));
#else
entry = new CacheEntry((GeomVertexData *)this, key);
#endif
{
LightMutexHolder holder(_cache_lock);
bool inserted = ((GeomVertexData *)this)->_cache.insert(Cache::value_type(&entry->_key, entry)).second;

View File

@ -246,9 +246,7 @@ public:
public:
INLINE CacheKey(const GeomVertexFormat *modifier);
INLINE CacheKey(const CacheKey &copy);
#ifdef USE_MOVE_SEMANTICS
INLINE CacheKey(CacheKey &&from) NOEXCEPT;
#endif
INLINE CacheKey(CacheKey &&from) noexcept;
INLINE bool operator < (const CacheKey &other) const;
@ -260,9 +258,8 @@ public:
INLINE CacheEntry(GeomVertexData *source,
const GeomVertexFormat *modifier);
INLINE CacheEntry(GeomVertexData *source, const CacheKey &key);
#ifdef USE_MOVE_SEMANTICS
INLINE CacheEntry(GeomVertexData *source, CacheKey &&key) NOEXCEPT;
#endif
INLINE CacheEntry(GeomVertexData *source, CacheKey &&key) noexcept;
ALLOC_DELETED_CHAIN(CacheEntry);
virtual void evict_callback();
@ -410,14 +407,12 @@ protected:
Thread *current_thread,
GeomVertexData::CData *cdata);
private:
GeomVertexDataPipelineBase(const GeomVertexDataPipelineBase &copy) DELETED;
GeomVertexDataPipelineBase &operator = (const GeomVertexDataPipelineBase &copy) DELETED_ASSIGN;
public:
GeomVertexDataPipelineBase(const GeomVertexDataPipelineBase &copy) = delete;
INLINE ~GeomVertexDataPipelineBase();
public:
GeomVertexDataPipelineBase &operator = (const GeomVertexDataPipelineBase &copy) = delete;
INLINE Thread *get_current_thread() const;
INLINE const GeomVertexFormat *get_format() const;

View File

@ -52,7 +52,7 @@ class GeomMunger;
* standard and/or user-defined columns in your custom GeomVertexFormat
* constructions.
*/
class EXPCL_PANDA_GOBJ GeomVertexFormat FINAL : public TypedWritableReferenceCount, public GeomEnums {
class EXPCL_PANDA_GOBJ GeomVertexFormat final : public TypedWritableReferenceCount, public GeomEnums {
PUBLISHED:
GeomVertexFormat();
GeomVertexFormat(const GeomVertexArrayFormat *array_format);

View File

@ -50,7 +50,7 @@ GeomVertexReader(const GeomVertexData *vertex_data,
_current_thread(current_thread)
{
initialize();
set_column(MOVE(name));
set_column(std::move(name));
}
/**

View File

@ -45,7 +45,7 @@ GeomVertexRewriter(GeomVertexData *vertex_data, CPT_InternalName name,
GeomVertexWriter(vertex_data, current_thread),
GeomVertexReader(vertex_data, current_thread)
{
set_column(MOVE(name));
set_column(std::move(name));
}
/**
@ -184,7 +184,7 @@ set_column(CPT_InternalName name) {
// It's important to invoke the writer first, then the reader. See
// set_row().
GeomVertexWriter::set_column(name);
return GeomVertexReader::set_column(MOVE(name));
return GeomVertexReader::set_column(std::move(name));
}
/**

View File

@ -48,7 +48,7 @@ GeomVertexWriter(GeomVertexData *vertex_data, CPT_InternalName name,
_current_thread(current_thread)
{
initialize();
set_column(MOVE(name));
set_column(std::move(name));
}
/**

View File

@ -422,13 +422,12 @@ CPT_InternalName(const char (&literal)[N]) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE CPT_InternalName::
CPT_InternalName(PointerTo<InternalName> &&from) NOEXCEPT :
ConstPointerTo<InternalName>(move(from))
CPT_InternalName(PointerTo<InternalName> &&from) noexcept :
ConstPointerTo<InternalName>(std::move(from))
{
}
@ -436,8 +435,8 @@ CPT_InternalName(PointerTo<InternalName> &&from) NOEXCEPT :
*
*/
INLINE CPT_InternalName::
CPT_InternalName(ConstPointerTo<InternalName> &&from) NOEXCEPT :
ConstPointerTo<InternalName>(move(from))
CPT_InternalName(ConstPointerTo<InternalName> &&from) noexcept :
ConstPointerTo<InternalName>(std::move(from))
{
}
@ -445,8 +444,8 @@ CPT_InternalName(ConstPointerTo<InternalName> &&from) NOEXCEPT :
*
*/
INLINE CPT_InternalName &CPT_InternalName::
operator = (PointerTo<InternalName> &&from) NOEXCEPT {
this->reassign(move(from));
operator = (PointerTo<InternalName> &&from) noexcept {
this->reassign(std::move(from));
return *this;
}
@ -454,11 +453,10 @@ operator = (PointerTo<InternalName> &&from) NOEXCEPT {
*
*/
INLINE CPT_InternalName &CPT_InternalName::
operator = (ConstPointerTo<InternalName> &&from) NOEXCEPT {
this->reassign(move(from));
operator = (ConstPointerTo<InternalName> &&from) noexcept {
this->reassign(std::move(from));
return *this;
}
#endif // USE_MOVE_SEMANTICS
/**
*

View File

@ -35,7 +35,7 @@ class FactoryParams;
* composition of one or more other names, or by giving it a source string
* directly.
*/
class EXPCL_PANDA_GOBJ InternalName FINAL : public TypedWritableReferenceCount {
class EXPCL_PANDA_GOBJ InternalName final : public TypedWritableReferenceCount {
private:
InternalName(InternalName *parent, const string &basename);
@ -198,25 +198,22 @@ class CPT_InternalName : public ConstPointerTo<InternalName> {
public:
INLINE CPT_InternalName(const To *ptr = (const To *)NULL);
INLINE CPT_InternalName(const PointerTo<InternalName> &copy);
INLINE CPT_InternalName(PointerTo<InternalName> &&from) noexcept;
INLINE CPT_InternalName(const ConstPointerTo<InternalName> &copy);
INLINE CPT_InternalName(ConstPointerTo<InternalName> &&from) noexcept;
INLINE CPT_InternalName(const string &name);
template<int N>
INLINE CPT_InternalName(const char (&literal)[N]);
#ifdef USE_MOVE_SEMANTICS
INLINE CPT_InternalName(PointerTo<InternalName> &&from) NOEXCEPT;
INLINE CPT_InternalName(ConstPointerTo<InternalName> &&from) NOEXCEPT;
INLINE CPT_InternalName &operator = (PointerTo<InternalName> &&from) NOEXCEPT;
INLINE CPT_InternalName &operator = (ConstPointerTo<InternalName> &&from) NOEXCEPT;
#endif // USE_MOVE_SEMANTICS
INLINE CPT_InternalName &operator = (const To *ptr);
INLINE CPT_InternalName &operator = (const PointerTo<InternalName> &copy);
INLINE CPT_InternalName &operator = (const ConstPointerTo<InternalName> &copy);
INLINE CPT_InternalName &operator = (PointerTo<InternalName> &&from) noexcept;
INLINE CPT_InternalName &operator = (ConstPointerTo<InternalName> &&from) noexcept;
};
INLINE void swap(CPT_InternalName &one, CPT_InternalName &two) NOEXCEPT {
INLINE void swap(CPT_InternalName &one, CPT_InternalName &two) noexcept {
one.swap(two);
}
#endif // CPPPARSER

View File

@ -164,7 +164,7 @@ public:
* This is a handle to an enqueued object, from which the result can be
* obtained upon completion.
*/
class EXPCL_PANDA_GOBJ EnqueuedObject FINAL : public AsyncFuture {
class EXPCL_PANDA_GOBJ EnqueuedObject final : public AsyncFuture {
public:
EnqueuedObject(PreparedGraphicsObjects *pgo, TypedWritableReferenceCount *object);
@ -173,7 +173,7 @@ public:
void set_result(SavedContext *result);
void notify_removed();
virtual bool cancel() FINAL;
virtual bool cancel() final;
PUBLISHED:
MAKE_PROPERTY(object, get_object);

View File

@ -29,7 +29,7 @@ class PreparedGraphicsObjects;
*/
class EXPCL_PANDA_GOBJ ShaderBuffer : public TypedWritableReferenceCount, public Namable, public GeomEnums {
private:
INLINE ShaderBuffer() DEFAULT_CTOR;
INLINE ShaderBuffer() = default;
PUBLISHED:
~ShaderBuffer();

View File

@ -4895,14 +4895,14 @@ do_read_ktx(CData *cdata, istream &in, const string &filename, bool header_only)
}
}
do_set_ram_mipmap_image(cdata, (int)n, MOVE(image),
do_set_ram_mipmap_image(cdata, (int)n, move(image),
row_size * do_get_expected_mipmap_y_size(cdata, (int)n));
} else {
// Compressed image. We'll trust that the file has the right size.
image = PTA_uchar::empty_array(image_size);
ktx.extract_bytes(image.p(), image_size);
do_set_ram_mipmap_image(cdata, (int)n, MOVE(image), image_size / depth);
do_set_ram_mipmap_image(cdata, (int)n, move(image), image_size / depth);
}
ktx.skip_bytes(3 - ((image_size + 3) & 3));

View File

@ -77,7 +77,7 @@ set_ram_image(PyObject *image, Texture::CompressionMode compression,
PTA_uchar data = PTA_uchar::empty_array(view.len, Texture::get_class_type());
memcpy(data.p(), view.buf, view.len);
_this->set_ram_image(MOVE(data), compression, page_size);
_this->set_ram_image(move(data), compression, page_size);
PyBuffer_Release(&view);
return;
@ -102,7 +102,7 @@ set_ram_image(PyObject *image, Texture::CompressionMode compression,
PTA_uchar data = PTA_uchar::empty_array(buffer_len, Texture::get_class_type());
memcpy(data.p(), buffer, buffer_len);
_this->set_ram_image(MOVE(data), compression, page_size);
_this->set_ram_image(move(data), compression, page_size);
return;
}
#endif
@ -155,7 +155,7 @@ set_ram_image_as(PyObject *image, const string &provided_format) {
PTA_uchar data = PTA_uchar::empty_array(view.len, Texture::get_class_type());
memcpy(data.p(), view.buf, view.len);
_this->set_ram_image_as(MOVE(data), provided_format);
_this->set_ram_image_as(move(data), provided_format);
PyBuffer_Release(&view);
return;

View File

@ -17,7 +17,7 @@
class EXPCL_PANDA_LINMATH FLOATNAME(LPoint2) : public FLOATNAME(LVecBase2) {
PUBLISHED:
INLINE_LINMATH FLOATNAME(LPoint2)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(LPoint2)() = default;
INLINE_LINMATH FLOATNAME(LPoint2)(const FLOATNAME(LVecBase2)& copy);
INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE x, FLOATTYPE y);

View File

@ -20,7 +20,7 @@
*/
class EXPCL_PANDA_LINMATH FLOATNAME(LPoint3) : public FLOATNAME(LVecBase3) {
PUBLISHED:
INLINE_LINMATH FLOATNAME(LPoint3)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(LPoint3)() = default;
INLINE_LINMATH FLOATNAME(LPoint3)(const FLOATNAME(LVecBase3) &copy);
INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);

View File

@ -16,7 +16,7 @@
*/
class EXPCL_PANDA_LINMATH FLOATNAME(LPoint4) : public FLOATNAME(LVecBase4) {
PUBLISHED:
INLINE_LINMATH FLOATNAME(LPoint4)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(LPoint4)() = default;
INLINE_LINMATH FLOATNAME(LPoint4)(const FLOATNAME(LVecBase4) &copy);
INLINE_LINMATH FLOATNAME(LPoint4)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LPoint4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);

View File

@ -30,7 +30,7 @@ PUBLISHED:
#endif
};
INLINE_LINMATH FLOATNAME(LVecBase2)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(LVecBase2)() = default;
INLINE_LINMATH FLOATNAME(LVecBase2)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LVecBase2)(FLOATTYPE x, FLOATTYPE y);
ALLOC_DELETED_CHAIN(FLOATNAME(LVecBase2));
@ -50,7 +50,7 @@ PUBLISHED:
INLINE_LINMATH FLOATTYPE operator [](int i) const;
INLINE_LINMATH FLOATTYPE &operator [](int i);
CONSTEXPR static int size() { return 2; }
constexpr static int size() { return 2; }
INLINE_LINMATH bool is_nan() const;
@ -74,7 +74,7 @@ PUBLISHED:
INLINE_LINMATH void add_y(FLOATTYPE value);
INLINE_LINMATH const FLOATTYPE *get_data() const;
CONSTEXPR static int get_num_components() { return 2; }
constexpr static int get_num_components() { return 2; }
public:
INLINE_LINMATH iterator begin();

View File

@ -30,7 +30,7 @@ PUBLISHED:
#endif
};
INLINE_LINMATH FLOATNAME(LVecBase3)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(LVecBase3)() = default;
INLINE_LINMATH FLOATNAME(LVecBase3)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LVecBase3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);
INLINE_LINMATH FLOATNAME(LVecBase3)(const FLOATNAME(LVecBase2) &copy, FLOATTYPE z);
@ -52,7 +52,7 @@ PUBLISHED:
INLINE_LINMATH FLOATTYPE operator [](int i) const;
INLINE_LINMATH FLOATTYPE &operator [](int i);
CONSTEXPR static int size() { return 3; }
constexpr static int size() { return 3; }
INLINE_LINMATH bool is_nan() const;
@ -87,7 +87,7 @@ PUBLISHED:
INLINE_LINMATH void add_z(FLOATTYPE value);
INLINE_LINMATH const FLOATTYPE *get_data() const;
CONSTEXPR static int get_num_components() { return 3; }
constexpr static int get_num_components() { return 3; }
public:
INLINE_LINMATH iterator begin();

View File

@ -36,7 +36,7 @@ PUBLISHED:
#endif
};
INLINE_LINMATH FLOATNAME(LVecBase4)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(LVecBase4)() = default;
INLINE_LINMATH FLOATNAME(LVecBase4)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LVecBase4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);
INLINE_LINMATH FLOATNAME(LVecBase4)(const FLOATNAME(UnalignedLVecBase4) &copy);
@ -62,7 +62,7 @@ PUBLISHED:
INLINE_LINMATH FLOATTYPE operator [](int i) const;
INLINE_LINMATH FLOATTYPE &operator [](int i);
CONSTEXPR static int size() { return 4; }
constexpr static int size() { return 4; }
INLINE_LINMATH bool is_nan() const;
@ -100,7 +100,7 @@ PUBLISHED:
INLINE_LINMATH void add_w(FLOATTYPE value);
INLINE_LINMATH const FLOATTYPE *get_data() const;
CONSTEXPR static int get_num_components() { return 4; }
constexpr static int get_num_components() { return 4; }
INLINE_LINMATH void extract_data(float*){};
public:
@ -228,7 +228,7 @@ PUBLISHED:
#endif
};
INLINE_LINMATH FLOATNAME(UnalignedLVecBase4)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(UnalignedLVecBase4)() = default;
INLINE_LINMATH FLOATNAME(UnalignedLVecBase4)(const FLOATNAME(LVecBase4) &copy);
INLINE_LINMATH FLOATNAME(UnalignedLVecBase4)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(UnalignedLVecBase4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);
@ -238,10 +238,10 @@ PUBLISHED:
INLINE_LINMATH FLOATTYPE operator [](int i) const;
INLINE_LINMATH FLOATTYPE &operator [](int i);
CONSTEXPR static int size() { return 4; }
constexpr static int size() { return 4; }
INLINE_LINMATH const FLOATTYPE *get_data() const;
CONSTEXPR static int get_num_components() { return 4; }
constexpr static int get_num_components() { return 4; }
INLINE_LINMATH bool operator == (const FLOATNAME(UnalignedLVecBase4) &other) const;
INLINE_LINMATH bool operator != (const FLOATNAME(UnalignedLVecBase4) &other) const;

View File

@ -17,7 +17,7 @@
class EXPCL_PANDA_LINMATH FLOATNAME(LVector2) : public FLOATNAME(LVecBase2) {
PUBLISHED:
INLINE_LINMATH FLOATNAME(LVector2)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(LVector2)() = default;
INLINE_LINMATH FLOATNAME(LVector2)(const FLOATNAME(LVecBase2)& copy);
INLINE_LINMATH FLOATNAME(LVector2)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LVector2)(FLOATTYPE x, FLOATTYPE y);

View File

@ -20,7 +20,7 @@
*/
class EXPCL_PANDA_LINMATH FLOATNAME(LVector3) : public FLOATNAME(LVecBase3) {
PUBLISHED:
INLINE_LINMATH FLOATNAME(LVector3)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(LVector3)() = default;
INLINE_LINMATH FLOATNAME(LVector3)(const FLOATNAME(LVecBase3) &copy);
INLINE_LINMATH FLOATNAME(LVector3)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LVector3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);

View File

@ -16,7 +16,7 @@
*/
class EXPCL_PANDA_LINMATH FLOATNAME(LVector4) : public FLOATNAME(LVecBase4) {
PUBLISHED:
INLINE_LINMATH FLOATNAME(LVector4)() DEFAULT_CTOR;
INLINE_LINMATH FLOATNAME(LVector4)() = default;
INLINE_LINMATH FLOATNAME(LVector4)(const FLOATNAME(LVecBase4) &copy);
INLINE_LINMATH FLOATNAME(LVector4)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LVector4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);

View File

@ -51,8 +51,8 @@ PUBLISHED:
virtual void xform(const LMatrix4 &mat)=0;
public:
virtual GeometricBoundingVolume *as_geometric_bounding_volume() FINAL;
virtual const GeometricBoundingVolume *as_geometric_bounding_volume() const FINAL;
virtual GeometricBoundingVolume *as_geometric_bounding_volume() final;
virtual const GeometricBoundingVolume *as_geometric_bounding_volume() const final;
protected:
// Some virtual functions to implement fundamental bounding operations on

View File

@ -583,12 +583,7 @@ munge_points_to_quads(const CullTraverser *traverser, bool force) {
}
_geom = new_geom.p();
#ifdef USE_MOVE_SEMANTICS
_munged_data = move(new_data);
#else
_munged_data = new_data;
#endif
return true;
}

View File

@ -255,13 +255,12 @@ operator = (const GeomNode::Geoms &copy) {
_geoms = copy._geoms;
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE GeomNode::Geoms::
Geoms(GeomNode::Geoms &&from) NOEXCEPT :
_geoms(move(from._geoms))
Geoms(GeomNode::Geoms &&from) noexcept :
_geoms(std::move(from._geoms))
{
}
@ -269,10 +268,9 @@ Geoms(GeomNode::Geoms &&from) NOEXCEPT :
*
*/
INLINE void GeomNode::Geoms::
operator = (GeomNode::Geoms &&from) NOEXCEPT {
_geoms = move(from._geoms);
operator = (GeomNode::Geoms &&from) noexcept {
_geoms = std::move(from._geoms);
}
#endif // USE_MOVE_SEMANTICS
/**
* Returns the number of geoms of the node.

View File

@ -164,12 +164,10 @@ public:
INLINE Geoms();
INLINE Geoms(const CData *cdata);
INLINE Geoms(const Geoms &copy);
INLINE void operator = (const Geoms &copy);
INLINE Geoms(Geoms &&from) noexcept;
#ifdef USE_MOVE_SEMANTICS
INLINE Geoms(Geoms &&from) NOEXCEPT;
INLINE void operator = (Geoms &&from) NOEXCEPT;
#endif
INLINE void operator = (const Geoms &copy);
INLINE void operator = (Geoms &&from) noexcept;
INLINE int get_num_geoms() const;
INLINE CPT(Geom) get_geom(int n) const;

View File

@ -90,12 +90,11 @@ operator = (const NodePath &copy) {
_error_type = copy._error_type;
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE NodePath::
NodePath(NodePath &&from) NOEXCEPT :
NodePath(NodePath &&from) noexcept :
_head(move(from._head)),
_backup_key(from._backup_key),
_error_type(from._error_type)
@ -106,12 +105,11 @@ NodePath(NodePath &&from) NOEXCEPT :
*
*/
INLINE void NodePath::
operator = (NodePath &&from) NOEXCEPT {
operator = (NodePath &&from) noexcept {
_head = move(from._head);
_backup_key = from._backup_key;
_error_type = from._error_type;
}
#endif // USE_MOVE_SEMANTICS
/**
* Sets this NodePath to the empty NodePath. It will no longer point to any

View File

@ -5412,7 +5412,7 @@ calc_tight_bounds(LPoint3 &min_point, LPoint3 &max_point,
bool found_any = false;
node()->calc_tight_bounds(min_point, max_point, found_any,
MOVE(transform), current_thread);
move(transform), current_thread);
return found_any;
}

View File

@ -177,13 +177,12 @@ PUBLISHED:
Thread *current_thread = Thread::get_current_thread());
INLINE NodePath(const NodePath &copy);
INLINE void operator = (const NodePath &copy);
INLINE void clear();
INLINE NodePath(NodePath &&from) noexcept;
#ifdef USE_MOVE_SEMANTICS
INLINE NodePath(NodePath &&from) NOEXCEPT;
INLINE void operator = (NodePath &&from) NOEXCEPT;
#endif
INLINE void operator = (const NodePath &copy);
INLINE void operator = (NodePath &&from) noexcept;
INLINE void clear();
EXTENSION(NodePath __copy__() const);
EXTENSION(PyObject *__deepcopy__(PyObject *self, PyObject *memo) const);

View File

@ -25,7 +25,7 @@
*/
class EXPCL_PANDA_PGRAPH NodePathCollection {
PUBLISHED:
NodePathCollection() DEFAULT_CTOR;
NodePathCollection() = default;
#ifdef HAVE_PYTHON
EXTENSION(NodePathCollection(PyObject *self, PyObject *sequence));

View File

@ -39,7 +39,7 @@
* graph, and the NodePathComponents are stored in the nodes themselves to
* allow the nodes to keep these up to date as the scene graph is manipulated.
*/
class EXPCL_PANDA_PGRAPH NodePathComponent FINAL : public ReferenceCount {
class EXPCL_PANDA_PGRAPH NodePathComponent final : public ReferenceCount {
private:
NodePathComponent(PandaNode *node, NodePathComponent *next,
int pipeline_stage, Thread *current_thread);

View File

@ -929,12 +929,11 @@ operator = (const PandaNode::Children &copy) {
_down = copy._down;
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE PandaNode::Children::
Children(PandaNode::Children &&from) NOEXCEPT :
Children(PandaNode::Children &&from) noexcept :
_down(move(from._down))
{
}
@ -943,10 +942,9 @@ Children(PandaNode::Children &&from) NOEXCEPT :
*
*/
INLINE void PandaNode::Children::
operator = (PandaNode::Children &&from) NOEXCEPT {
operator = (PandaNode::Children &&from) noexcept {
_down = move(from._down);
}
#endif // USE_MOVE_SEMANTICS
/**
* Returns the number of children of the node.
@ -1011,13 +1009,12 @@ operator = (const PandaNode::Stashed &copy) {
_stashed = copy._stashed;
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE PandaNode::Stashed::
Stashed(PandaNode::Stashed &&from) NOEXCEPT :
_stashed(move(from._stashed))
Stashed(PandaNode::Stashed &&from) noexcept :
_stashed(std::move(from._stashed))
{
}
@ -1025,10 +1022,9 @@ Stashed(PandaNode::Stashed &&from) NOEXCEPT :
*
*/
INLINE void PandaNode::Stashed::
operator = (PandaNode::Stashed &&from) NOEXCEPT {
_stashed = move(from._stashed);
operator = (PandaNode::Stashed &&from) noexcept {
_stashed = std::move(from._stashed);
}
#endif // USE_MOVE_SEMANTICS
/**
* Returns the number of stashed children of the node.
@ -1093,13 +1089,12 @@ operator = (const PandaNode::Parents &copy) {
_up = copy._up;
}
#ifdef USE_MOVE_SEMANTICS
/**
*
*/
INLINE PandaNode::Parents::
Parents(PandaNode::Parents &&from) NOEXCEPT :
_up(move(from._up))
Parents(PandaNode::Parents &&from) noexcept :
_up(std::move(from._up))
{
}
@ -1107,10 +1102,9 @@ Parents(PandaNode::Parents &&from) NOEXCEPT :
*
*/
INLINE void PandaNode::Parents::
operator = (PandaNode::Parents &&from) NOEXCEPT {
_up = move(from._up);
operator = (PandaNode::Parents &&from) noexcept {
_up = std::move(from._up);
}
#endif // USE_MOVE_SEMANTICS
/**
* Returns the number of parents of the node.

View File

@ -710,12 +710,10 @@ PUBLISHED:
INLINE Children();
INLINE Children(const CData *cdata);
INLINE Children(const Children &copy);
INLINE void operator = (const Children &copy);
INLINE Children(Children &&from) noexcept;
#ifdef USE_MOVE_SEMANTICS
INLINE Children(Children &&from) NOEXCEPT;
INLINE void operator = (Children &&from) NOEXCEPT;
#endif
INLINE void operator = (const Children &copy);
INLINE void operator = (Children &&from) noexcept;
INLINE size_t get_num_children() const;
INLINE PandaNode *get_child(size_t n) const;
@ -735,12 +733,10 @@ PUBLISHED:
INLINE Stashed();
INLINE Stashed(const CData *cdata);
INLINE Stashed(const Stashed &copy);
INLINE void operator = (const Stashed &copy);
INLINE Stashed(Stashed &&from) noexcept;
#ifdef USE_MOVE_SEMANTICS
INLINE Stashed(Stashed &&from) NOEXCEPT;
INLINE void operator = (Stashed &&from) NOEXCEPT;
#endif
INLINE void operator = (const Stashed &copy);
INLINE void operator = (Stashed &&from) noexcept;
INLINE size_t get_num_stashed() const;
INLINE PandaNode *get_stashed(size_t n) const;
@ -760,12 +756,10 @@ PUBLISHED:
INLINE Parents();
INLINE Parents(const CData *cdata);
INLINE Parents(const Parents &copy);
INLINE void operator = (const Parents &copy);
INLINE Parents(Parents &&from) noexcept;
#ifdef USE_MOVE_SEMANTICS
INLINE Parents(Parents &&from) NOEXCEPT;
INLINE void operator = (Parents &&from) NOEXCEPT;
#endif
INLINE void operator = (const Parents &copy);
INLINE void operator = (Parents &&from) noexcept;
INLINE size_t get_num_parents() const;
INLINE PandaNode *get_parent(size_t n) const;

View File

@ -20,16 +20,14 @@ ParamNodePath(const NodePath &node_path) :
{
}
#ifdef USE_MOVE_SEMANTICS
/**
* Creates a new ParamNodePath storing the given node path object.
*/
INLINE ParamNodePath::
ParamNodePath(NodePath &&node_path) NOEXCEPT :
_node_path(move(node_path))
ParamNodePath(NodePath &&node_path) noexcept :
_node_path(std::move(node_path))
{
}
#endif // USE_MOVE_SEMANTICS
/**
* Returns NodePath::get_class_type().

View File

@ -27,10 +27,7 @@ protected:
PUBLISHED:
INLINE ParamNodePath(const NodePath &node_path);
#ifdef USE_MOVE_SEMANTICS
INLINE ParamNodePath(NodePath &&node_path) NOEXCEPT;
#endif
INLINE ParamNodePath(NodePath &&node_path) noexcept;
INLINE virtual TypeHandle get_value_type() const;
INLINE const NodePath &get_value() const;

View File

@ -72,7 +72,7 @@ PUBLISHED:
INLINE size_t get_hash() const;
INLINE CPT(RenderAttrib) get_unique() const;
virtual bool unref() const FINAL;
virtual bool unref() const final;
virtual void output(ostream &out) const;
virtual void write(ostream &out, int indent_level) const;

View File

@ -32,7 +32,7 @@ get_slot(TypeHandle type_handle) const {
*
* This number will not change during the lifetime of the application.
*/
CONSTEXPR int RenderAttribRegistry::
constexpr int RenderAttribRegistry::
get_max_slots() {
return _max_slots;
}

Some files were not shown because too many files have changed in this diff Show More