Base: [skip ci] lgtm: Inconsistent definition of copy constructor and assignment ('Rule of Two')

This commit is contained in:
wmayer
2022-03-20 16:30:14 +01:00
parent b09135fca7
commit 5edfc1ea42
2 changed files with 10 additions and 1 deletions

View File

@@ -67,6 +67,12 @@ namespace Py {
Py::_XINCREF( p );
}
SmartPtr &SmartPtr::operator=( const SmartPtr &rhs )
{
set( rhs.ptr() );
return *this;
}
SmartPtr &SmartPtr::operator=( const Object &rhs )
{
set( rhs.ptr() );