mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
chore: Eradicate C-style casts and further clean up some code (#1361)
* cast and code cleanup * cast cleanup * bug fixes and improvements * no getBoolField method exists * fixes * unbroke sg cannon scoring * removing comments * Remove the c-style cast warning I added from CMakeLists now that they're gone (it triggers on 3rd party dependencies and slows down compilation) * (Hopefully) fix MacOS compilation error * partially-implemented feedback * more updates to account for feedback * change bool default --------- Co-authored-by: jadebenn <jonahebenn@yahoo.com>
This commit is contained in:
@@ -4,21 +4,21 @@ void PropertySelectQueryProperty::Serialize(RakNet::BitStream& stream) const {
|
||||
stream.Write(CloneId);
|
||||
|
||||
const auto& owner = GeneralUtils::UTF8ToUTF16(OwnerName);
|
||||
stream.Write(uint32_t(owner.size()));
|
||||
stream.Write<uint32_t>(owner.size());
|
||||
for (uint32_t i = 0; i < owner.size(); ++i) {
|
||||
stream.Write(static_cast<uint16_t>(owner[i]));
|
||||
stream.Write<uint16_t>(owner[i]);
|
||||
}
|
||||
|
||||
const auto& name = GeneralUtils::UTF8ToUTF16(Name);
|
||||
stream.Write(uint32_t(name.size()));
|
||||
stream.Write<uint32_t>(name.size());
|
||||
for (uint32_t i = 0; i < name.size(); ++i) {
|
||||
stream.Write(static_cast<uint16_t>(name[i]));
|
||||
stream.Write<uint16_t>(name[i]);
|
||||
}
|
||||
|
||||
const auto& description = GeneralUtils::UTF8ToUTF16(Description);
|
||||
stream.Write(uint32_t(description.size()));
|
||||
stream.Write<uint32_t>(description.size());
|
||||
for (uint32_t i = 0; i < description.size(); ++i) {
|
||||
stream.Write(static_cast<uint16_t>(description[i]));
|
||||
stream.Write<uint16_t>(description[i]);
|
||||
}
|
||||
|
||||
stream.Write(Reputation);
|
||||
|
Reference in New Issue
Block a user