Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 12, 2015, 3:27:09 PM (10 years ago)
Author:
landauf
Message:

removed int constructor & assignment-operator from WeakPtr and SmartPtr

Location:
code/branches/core7/src/libraries/core/object
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/object/SmartPtr.h

    r9571 r10358  
    142142            }
    143143
    144             /// Constructor: Used to explicitly initialize the smart pointer with a null pointer
    145             inline SmartPtr(int) : pointer_(0), base_(0)
    146             {
    147             }
    148 
    149144            /// 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)
    150145            inline SmartPtr(T* pointer, bool bAddRef = true) : pointer_(pointer), base_(pointer)
     
    182177                if (this->base_)
    183178                    this->base_->decrementReferenceCount();
    184             }
    185 
    186             /// Used to assign a null pointer.
    187             inline SmartPtr& operator=(int)
    188             {
    189                 SmartPtr(0).swap(*this);
    190                 return *this;
    191179            }
    192180
  • code/branches/core7/src/libraries/core/object/WeakPtr.h

    r9571 r10358  
    104104            }
    105105
    106             /// Constructor: Used to explicitly initialize the weak pointer with a null pointer
    107             inline WeakPtr(int) : pointer_(0), base_(0), callback_(0)
    108             {
    109             }
    110 
    111106            /// Constructor: Initializes the weak pointer with a pointer to an object.
    112107            inline WeakPtr(T* pointer) : pointer_(pointer), base_(pointer), callback_(0)
     
    132127            {
    133128                this->unregisterAsDestructionListener(this->base_);
    134             }
    135 
    136             /// Used to assign a null pointer.
    137             inline WeakPtr& operator=(int)
    138             {
    139                 WeakPtr(0).swap(*this);
    140                 return *this;
    141129            }
    142130
Note: See TracChangeset for help on using the changeset viewer.