mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Remove trailing semicolons from more macros
This commit is contained in:
parent
a5e95cce96
commit
ccac73fb69
@ -111,11 +111,7 @@
|
||||
// They all assume that interface mutex is locked.
|
||||
#define EVENT_HANDLER_CALLED_BY_CLIENT
|
||||
|
||||
#define BATTLE_EVENT_POSSIBLE_RETURN \
|
||||
if (LOCPLINT != this) \
|
||||
return; \
|
||||
if (isAutoFightOn && !battleInt) \
|
||||
return;
|
||||
#define BATTLE_EVENT_POSSIBLE_RETURN if (LOCPLINT != this) return; if (isAutoFightOn && !battleInt) return
|
||||
|
||||
CPlayerInterface * LOCPLINT;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include <vcmi/Entity.h>
|
||||
|
||||
#define RETURN_IF_NOT_BATTLE(...) if(!duringBattle()) {logGlobal->error("%s called when no battle!", __FUNCTION__); return __VA_ARGS__; }
|
||||
#define RETURN_IF_NOT_BATTLE(...) do { if(!duringBattle()) {logGlobal->error("%s called when no battle!", __FUNCTION__); return __VA_ARGS__; } } while (false)
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
|
@ -42,7 +42,7 @@ VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
CObjectClassesHandler::CObjectClassesHandler()
|
||||
{
|
||||
#define SET_HANDLER_CLASS(STRING, CLASSNAME) handlerConstructors[STRING] = std::make_shared<CLASSNAME>;
|
||||
#define SET_HANDLER_CLASS(STRING, CLASSNAME) handlerConstructors[STRING] = std::make_shared<CLASSNAME>
|
||||
#define SET_HANDLER(STRING, TYPENAME) handlerConstructors[STRING] = std::make_shared<CDefaultObjectTypeHandler<TYPENAME>>
|
||||
|
||||
// list of all known handlers, hardcoded for now since the only way to add new objects is via C++ code
|
||||
|
@ -21,8 +21,8 @@ class Zone;
|
||||
class MapProxy;
|
||||
|
||||
#define MODIFICATOR(x) x(Zone & z, RmgMap & m, CMapGenerator & g): Modificator(z, m, g) {setName(#x);}
|
||||
#define DEPENDENCY(x) dependency(zone.getModificator<x>());
|
||||
#define POSTFUNCTION(x) postfunction(zone.getModificator<x>());
|
||||
#define DEPENDENCY(x) dependency(zone.getModificator<x>())
|
||||
#define POSTFUNCTION(x) postfunction(zone.getModificator<x>())
|
||||
#define DEPENDENCY_ALL(x) for(auto & z : map.getZones()) \
|
||||
{ \
|
||||
dependency(z.second->getModificator<x>()); \
|
||||
|
Loading…
Reference in New Issue
Block a user