mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +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:
@@ -59,7 +59,7 @@ void Zone::LoadZoneIntoMemory() {
|
||||
if (m_FileFormatVersion >= Zone::FileFormatVersion::Alpha) BinaryIO::BinaryRead(file, mapRevision);
|
||||
|
||||
BinaryIO::BinaryRead(file, m_WorldID);
|
||||
if ((uint16_t)m_WorldID != m_ZoneID.GetMapID()) LOG("WorldID: %i doesn't match MapID %i! Is this intended?", m_WorldID, m_ZoneID.GetMapID());
|
||||
if (static_cast<LWOMAPID>(m_WorldID) != m_ZoneID.GetMapID()) LOG("WorldID: %i doesn't match MapID %i! Is this intended?", m_WorldID, m_ZoneID.GetMapID());
|
||||
|
||||
AddRevision(LWOSCENEID_INVALID, mapRevision);
|
||||
|
||||
@@ -147,7 +147,7 @@ void Zone::LoadZoneIntoMemory() {
|
||||
} else {
|
||||
LOG("Failed to open: %s", m_ZoneFilePath.c_str());
|
||||
}
|
||||
|
||||
|
||||
m_ZonePath = m_ZoneFilePath.substr(0, m_ZoneFilePath.rfind('/') + 1);
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ void Zone::LoadScene(std::istream& file) {
|
||||
|
||||
void Zone::LoadLUTriggers(std::string triggerFile, SceneRef& scene) {
|
||||
auto file = Game::assetManager->GetFile((m_ZonePath + triggerFile).c_str());
|
||||
|
||||
|
||||
std::stringstream data;
|
||||
data << file.rdbuf();
|
||||
|
||||
|
Reference in New Issue
Block a user