[Orxonox-commit 5698] r10358 - in code/branches/core7/src/libraries/core: . object
landauf at orxonox.net
landauf at orxonox.net
Sun Apr 12 15:27:09 CEST 2015
Author: landauf
Date: 2015-04-12 15:27:09 +0200 (Sun, 12 Apr 2015)
New Revision: 10358
Modified:
code/branches/core7/src/libraries/core/BaseObject.cc
code/branches/core7/src/libraries/core/object/SmartPtr.h
code/branches/core7/src/libraries/core/object/WeakPtr.h
Log:
removed int constructor & assignment-operator from WeakPtr and SmartPtr
Modified: code/branches/core7/src/libraries/core/BaseObject.cc
===================================================================
--- code/branches/core7/src/libraries/core/BaseObject.cc 2015-04-12 09:58:06 UTC (rev 10357)
+++ code/branches/core7/src/libraries/core/BaseObject.cc 2015-04-12 13:27:09 UTC (rev 10358)
@@ -85,11 +85,7 @@
else
{
this->file_ = 0;
- this->namespace_ = 0;
- this->scene_ = 0;
this->sceneID_ = OBJECTID_UNKNOWN;
- this->gametype_ = 0;
- this->level_ = 0;
}
}
Modified: code/branches/core7/src/libraries/core/object/SmartPtr.h
===================================================================
--- code/branches/core7/src/libraries/core/object/SmartPtr.h 2015-04-12 09:58:06 UTC (rev 10357)
+++ code/branches/core7/src/libraries/core/object/SmartPtr.h 2015-04-12 13:27:09 UTC (rev 10358)
@@ -141,11 +141,6 @@
{
}
- /// Constructor: Used to explicitly initialize the smart pointer with a null pointer
- inline SmartPtr(int) : pointer_(0), base_(0)
- {
- }
-
/// Constructor: Initializes the smart pointer with a pointer to an object. @param pointer The pointer @param bAddRef If true, the reference counter is increased. Don't set this to false unless you know exactly what you're doing! (for example to avoid circular references if the @c this pointer of the possessing object is stored)
inline SmartPtr(T* pointer, bool bAddRef = true) : pointer_(pointer), base_(pointer)
{
@@ -183,13 +178,6 @@
this->base_->decrementReferenceCount();
}
- /// Used to assign a null pointer.
- inline SmartPtr& operator=(int)
- {
- SmartPtr(0).swap(*this);
- return *this;
- }
-
/// Assigns a new pointer.
inline SmartPtr& operator=(T* pointer)
{
Modified: code/branches/core7/src/libraries/core/object/WeakPtr.h
===================================================================
--- code/branches/core7/src/libraries/core/object/WeakPtr.h 2015-04-12 09:58:06 UTC (rev 10357)
+++ code/branches/core7/src/libraries/core/object/WeakPtr.h 2015-04-12 13:27:09 UTC (rev 10358)
@@ -103,11 +103,6 @@
{
}
- /// Constructor: Used to explicitly initialize the weak pointer with a null pointer
- inline WeakPtr(int) : pointer_(0), base_(0), callback_(0)
- {
- }
-
/// Constructor: Initializes the weak pointer with a pointer to an object.
inline WeakPtr(T* pointer) : pointer_(pointer), base_(pointer), callback_(0)
{
@@ -133,13 +128,6 @@
this->unregisterAsDestructionListener(this->base_);
}
- /// Used to assign a null pointer.
- inline WeakPtr& operator=(int)
- {
- WeakPtr(0).swap(*this);
- return *this;
- }
-
/// Assigns a new pointer.
inline WeakPtr& operator=(T* pointer)
{
More information about the Orxonox-commit
mailing list