Skip to content

Commit 95df08a

Browse files
committed
Updates! (Fixed an operator)
1 parent 65143c6 commit 95df08a

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

Include/discordcoreapi/FoundationEntities.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,13 @@ namespace DiscordCoreInternal {
293293
String callStack{};
294294
String content{};
295295

296-
HttpsWorkloadData& operator=(const HttpsWorkloadData& other) noexcept;
296+
HttpsWorkloadData& operator=(HttpsWorkloadData&& other) noexcept;
297297

298-
HttpsWorkloadData(const HttpsWorkloadData& other) noexcept;
298+
HttpsWorkloadData(HttpsWorkloadData&& other) noexcept;
299+
300+
HttpsWorkloadData& operator=(const HttpsWorkloadData& other) noexcept = delete;
301+
302+
HttpsWorkloadData(const HttpsWorkloadData& other) noexcept = delete;
299303

300304
HttpsWorkloadData(DiscordCoreInternal::HttpsWorkloadType theType) noexcept;
301305

Source/FoundationEntities.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,23 @@ namespace DiscordCoreInternal {
130130
return theData;
131131
}
132132

133-
HttpsWorkloadData& HttpsWorkloadData::operator=(const HttpsWorkloadData& other) noexcept {
134-
if (this != &other) {
133+
HttpsWorkloadData& HttpsWorkloadData::operator=(HttpsWorkloadData&& other) noexcept {
134+
if (this != &other) {
135+
this->headersToInsert = std::move(other.headersToInsert);
135136
this->thisWorkerId.store(this->thisWorkerId.load());
136-
this->headersToInsert = other.headersToInsert;
137+
this->relativePath = std::move(other.relativePath);
138+
this->callStack = std::move(other.callStack);
137139
this->workloadClass = other.workloadClass;
140+
this->baseUrl = std::move(other.baseUrl);
141+
this->content = std::move(other.content);
138142
this->workloadType = other.workloadType;
139-
this->relativePath = other.relativePath;
140143
this->payloadType = other.payloadType;
141-
this->callStack = other.callStack;
142-
this->baseUrl = other.baseUrl;
143-
this->content = other.content;
144144
}
145145
return *this;
146146
}
147147

148-
HttpsWorkloadData::HttpsWorkloadData(const HttpsWorkloadData& other) noexcept {
149-
*this = other;
148+
HttpsWorkloadData::HttpsWorkloadData(HttpsWorkloadData&& other) noexcept {
149+
*this = std::move(other);
150150
}
151151

152152
HttpsWorkloadData::HttpsWorkloadData(DiscordCoreInternal::HttpsWorkloadType theType) noexcept {
@@ -3119,7 +3119,7 @@ namespace DiscordCoreAPI {
31193119
break;
31203120
}
31213121
case JsonType::Float: {
3122-
theData["value"] = Float{ stod(this->value) };
3122+
theData["value"] = Double{ stod(this->value) };
31233123
break;
31243124
}
31253125
case JsonType::Boolean: {

0 commit comments

Comments
 (0)