From 4aa3bdd38a715b2bad3dafaef0be36fc7e7a73ae Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Thu, 29 Sep 2016 23:30:03 -0500 Subject: [PATCH] pick up some stragglers --- .../application/CommoditiesServer/src/shared/Auction.cpp | 6 ++++-- .../library/serverGame/src/shared/core/GameServer.cpp | 4 +++- .../serverGame/src/shared/object/IntangibleObject.cpp | 5 +++-- .../src/shared/ServerPathfindingMessaging.cpp | 4 +++- .../serverScript/src/shared/ScriptMethodsObjectCreate.cpp | 4 +++- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/engine/server/application/CommoditiesServer/src/shared/Auction.cpp b/engine/server/application/CommoditiesServer/src/shared/Auction.cpp index 63f43523..9fcc7264 100755 --- a/engine/server/application/CommoditiesServer/src/shared/Auction.cpp +++ b/engine/server/application/CommoditiesServer/src/shared/Auction.cpp @@ -27,6 +27,8 @@ #include "sharedUtility/DataTable.h" #include "sharedUtility/DataTableManager.h" +#include "sharedFoundation/CrcConstexpr.hpp" + #include // src/engine/client/library/clientGame/src/shared/core/AuctionManagerClient.cpp (s_maxBid) @@ -1360,8 +1362,8 @@ void Auction::BuildSearchableAttributeList() if (!m_searchableAttributeString) m_searchableAttributeString = new std::map; - static uint32 const shipCertAttributeCrc = Crc::calculate("ship_equipment_certification_search_attribute"); - static uint32 const astromechCertAttributeCrc = Crc::calculate("astromech_certification_search_attribute"); + static uint32 const shipCertAttributeCrc = constcrc("ship_equipment_certification_search_attribute"); + static uint32 const astromechCertAttributeCrc = constcrc("astromech_certification_search_attribute"); if (itemIsShipComponentOrShipFlightComputer) { diff --git a/engine/server/library/serverGame/src/shared/core/GameServer.cpp b/engine/server/library/serverGame/src/shared/core/GameServer.cpp index f92159bd..dec61faa 100755 --- a/engine/server/library/serverGame/src/shared/core/GameServer.cpp +++ b/engine/server/library/serverGame/src/shared/core/GameServer.cpp @@ -230,6 +230,8 @@ #include "swgSharedUtility/SpeciesRestrictions.h" #include "unicodeArchive/UnicodeArchive.h" +#include "sharedFoundation/CrcConstexpr.hpp" + #include //----------------------------------------------------------------------- @@ -4935,7 +4937,7 @@ void GameServer::handleTeleportMessage(TeleportMessage const &message) buf[sizeof(buf)-1] = '\0'; Command::ErrorCode status = Command::CEC_Success; - creature->forceExecuteCommand(CommandTable::getCommand(Crc::calculate("planetwarp")), NetworkId::cms_invalid, Unicode::narrowToWide(buf), status, false); + creature->forceExecuteCommand(CommandTable::getCommand(constcrc("planetwarp")), NetworkId::cms_invalid, Unicode::narrowToWide(buf), status, false); } } diff --git a/engine/server/library/serverGame/src/shared/object/IntangibleObject.cpp b/engine/server/library/serverGame/src/shared/object/IntangibleObject.cpp index 5d32403f..ca96eba0 100755 --- a/engine/server/library/serverGame/src/shared/object/IntangibleObject.cpp +++ b/engine/server/library/serverGame/src/shared/object/IntangibleObject.cpp @@ -30,7 +30,6 @@ #include "serverUtility/ServerClock.h" #include "sharedFoundation/Clock.h" #include "sharedFoundation/ConstCharCrcLowerString.h" -#include "sharedFoundation/Crc.h" #include "sharedGame/SharedObjectTemplate.h" #include "sharedLog/Log.h" #include "sharedNetworkMessages/GenericValueTypeMessage.h" @@ -39,6 +38,8 @@ #include "sharedUtility/DataTable.h" #include "sharedUtility/DataTableManager.h" +#include "sharedFoundation/CrcConstexpr.hpp" + #include // ====================================================================== @@ -47,7 +48,7 @@ const SharedObjectTemplate * IntangibleObject::m_defaultSharedTemplate = nullptr uint32 IntangibleObject::ms_lastFrame = 0; uint32 IntangibleObject::ms_theaterTime = 0; -static const uint32 THEATER_DATATABLE_TAG = Crc::calculate("THEATER"); +static const uint32 THEATER_DATATABLE_TAG = constcrc("THEATER"); static const std::string THEATER_TEMPLATE("object/intangible/theater/base_theater.iff"); static const std::string THEATER_FLATTEN_LAYER("terrain/poi_small.lay"); diff --git a/engine/server/library/serverPathfinding/src/shared/ServerPathfindingMessaging.cpp b/engine/server/library/serverPathfinding/src/shared/ServerPathfindingMessaging.cpp index e71513d5..d3198dec 100755 --- a/engine/server/library/serverPathfinding/src/shared/ServerPathfindingMessaging.cpp +++ b/engine/server/library/serverPathfinding/src/shared/ServerPathfindingMessaging.cpp @@ -31,6 +31,8 @@ #include #include +#include "sharedFoundation/CrcConstexpr.hpp" + ServerPathfindingMessaging * g_messaging = nullptr; // ====================================================================== @@ -195,7 +197,7 @@ void ServerPathfindingMessaging::receiveMessage(const MessageDispatch::Emitter & { // if there are no waypoints, use the /eject command s->asCreatureObject()->commandQueueEnqueue(CommandTable::getCommand( - Crc::calculate("eject")), NetworkId::cms_invalid, Unicode::String()); + constcrc("eject")), NetworkId::cms_invalid, Unicode::String()); } } else diff --git a/engine/server/library/serverScript/src/shared/ScriptMethodsObjectCreate.cpp b/engine/server/library/serverScript/src/shared/ScriptMethodsObjectCreate.cpp index 2f967f59..7f2edf89 100755 --- a/engine/server/library/serverScript/src/shared/ScriptMethodsObjectCreate.cpp +++ b/engine/server/library/serverScript/src/shared/ScriptMethodsObjectCreate.cpp @@ -47,6 +47,8 @@ #include "sharedUtility/DataTable.h" #include "sharedUtility/DataTableManager.h" +#include "sharedFoundation/CrcConstexpr.hpp" + using namespace JNIWrappersNamespace; @@ -54,7 +56,7 @@ using namespace JNIWrappersNamespace; // constants //======================================================================== -static const uint32 THEATER_DATATABLE_TAG = Crc::calculate("THEATER"); +static const uint32 THEATER_DATATABLE_TAG = constcrc("THEATER"); static const std::string THEATER_TEMPLATE("object/intangible/theater/base_theater.iff"); static const std::string THEATER_FLATTEN_LAYER("terrain/poi_small.lay");