mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
up
This commit is contained in:
parent
8008f131fb
commit
b7e45ac2d2
@ -41,20 +41,16 @@ namespace pkpy{
|
||||
}
|
||||
|
||||
shared_ptr& operator=(const shared_ptr& other) {
|
||||
if (this != &other) {
|
||||
_dec_counter();
|
||||
counter = other.counter;
|
||||
_inc_counter();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
shared_ptr& operator=(shared_ptr&& other) noexcept {
|
||||
if (this != &other) {
|
||||
_dec_counter();
|
||||
counter = other.counter;
|
||||
other.counter = nullptr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -99,13 +99,11 @@ namespace pkpy {
|
||||
const PyVar& operator[](uint8_t i) const { return _args[i]; }
|
||||
|
||||
ArgList& operator=(ArgList&& other) noexcept {
|
||||
if(this != &other){
|
||||
__tryRelease();
|
||||
this->_args = other._args;
|
||||
this->_size = other._size;
|
||||
other._args = nullptr;
|
||||
other._size = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user