parent
502fc471de
commit
ce6d9c2f2f
|
@ -45,9 +45,20 @@ Board::~Board()
|
|||
|
||||
Board &Board::operator= (const Board &other)
|
||||
{
|
||||
if (this == &other)
|
||||
return *this;
|
||||
|
||||
memcpy(this->locations, other.locations, sizeof(this->locations));
|
||||
|
||||
// TODO: 确定 millList 确实不用复制?
|
||||
if (!millList.empty()) {
|
||||
millList.clear();
|
||||
}
|
||||
|
||||
if (!other.millList.empty()) {
|
||||
for (auto i : other.millList) {
|
||||
millList.push_back(i);
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue