Update namedict.h

This commit is contained in:
blueloveTH 2023-02-22 18:35:50 +08:00
parent 371411d53a
commit ca07bd7394

View File

@ -30,15 +30,7 @@ namespace pkpy{
for(int i=0; i<_capacity; i++) _a[i] = other._a[i];
}
NameDict& operator=(const NameDict& other){
delete[] _a;
this->_capacity = other._capacity;
this->_size = other._size;
this->_a = new NameDictNode[_capacity];
for(int i=0; i<_capacity; i++) _a[i] = other._a[i];
return *this;
}
NameDict& operator=(const NameDict&) = delete;
NameDict(NameDict&&) = delete;
NameDict& operator=(NameDict&&) = delete;