diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-07-01 07:21:10 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-07-01 07:21:10 -0300 |
| commit | 6243967f1fac3af8ed3e72790cabed0f79978bdb (patch) | |
| tree | 35f0d27b4c280622c368a9fa94815b8deb7a990f /src/operate.cc | |
| parent | 6c8aa85b8b578db03a8c5f0dc0b7e80605592d45 (diff) | |
| download | game-6243967f1fac3af8ed3e72790cabed0f79978bdb.tar.gz game-6243967f1fac3af8ed3e72790cabed0f79978bdb.zip | |
fix `operator=` for `TChannel`, `TParty`, and `THouse`
I had focused on copying the `vector` fields for theses structs
but, being the copy operator, you need to copy everything over.
Diffstat (limited to 'src/operate.cc')
| -rw-r--r-- | src/operate.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/operate.cc b/src/operate.cc index a9644c2..7099cc1 100644 --- a/src/operate.cc +++ b/src/operate.cc @@ -3357,6 +3357,9 @@ TChannel::TChannel(const TChannel &Other) : TChannel() { } void TChannel::operator=(const TChannel &Other){ + this->Moderator = Other.Moderator; + memcpy(this->ModeratorName, Other.ModeratorName, sizeof(this->ModeratorName)); + this->Subscribers = Other.Subscribers; for(int i = 0; i < Other.Subscribers; i += 1){ *this->Subscriber.at(i) = Other.Subscriber.copyAt(i); @@ -3814,6 +3817,8 @@ TParty::TParty(const TParty &Other) : TParty() { } void TParty::operator=(const TParty &Other){ + this->Leader = Other.Leader; + this->Members = Other.Members; for(int i = 0; i < Other.Members; i += 1){ *this->Member.at(i) = Other.Member.copyAt(i); |
