1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Refactoring: replace macro with variadic templates on client-side

Big thanks to @mwu-tow for helping me with this.
This commit is contained in:
Arseniy Shestakov
2018-02-03 17:44:30 +03:00
committed by ArseniyShestakov
parent 7c77249d37
commit fc3b8b2c87
3 changed files with 163 additions and 175 deletions

View File

@@ -485,8 +485,8 @@ void CClient::newGame( CConnection *con, StartInfo *si )
// for(FileInfo &m : scriptModules)
// {
// CScriptingModule * nm = CDynLibHandler::getNewScriptingModule(m.name);
// privilagedGameEventReceivers.push_back(nm);
// privilagedBattleEventReceivers.push_back(nm);
// privilegedGameEventReceivers.push_back(nm);
// privilegedBattleEventReceivers.push_back(nm);
// nm->giveActionCB(this);
// nm->giveInfoCB(this);
// nm->init();
@@ -925,7 +925,7 @@ void CClient::installNewPlayerInterface(std::shared_ptr<CGameInterface> gameInte
PlayerColor colorUsed = color.get_value_or(PlayerColor::UNFLAGGABLE);
if(!color)
privilagedGameEventReceivers.push_back(gameInterface);
privilegedGameEventReceivers.push_back(gameInterface);
playerint[colorUsed] = gameInterface;
@@ -944,7 +944,7 @@ void CClient::installNewBattleInterface(std::shared_ptr<CBattleGameInterface> ba
PlayerColor colorUsed = color.get_value_or(PlayerColor::UNFLAGGABLE);
if(!color)
privilagedBattleEventReceivers.push_back(battleInterface);
privilegedBattleEventReceivers.push_back(battleInterface);
battleints[colorUsed] = battleInterface;