mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
Redo ACTION_RETURN macros so they can be treated like return statements
This commit is contained in:
parent
81314a6cd6
commit
5e298173f7
2 changed files with 2 additions and 4 deletions
|
@ -357,8 +357,8 @@ int MatchString (const char *in, const char **strings);
|
|||
}
|
||||
|
||||
|
||||
#define ACTION_RETURN_STATE(state) if (numret > 0) { assert(ret != NULL); ret->SetPointer(state, ATAG_STATE); return 1; } return 0
|
||||
#define ACTION_RETURN_INT(v) if (numret > 0) { assert(ret != NULL); ret->SetInt(v); return 1; } return 0
|
||||
#define ACTION_RETURN_STATE(v) do { FState *state = v; if (numret > 0) { assert(ret != NULL); ret->SetPointer(state, ATAG_STATE); return 1; } return 0; } while(0)
|
||||
#define ACTION_RETURN_INT(v) do { int u = v; if (numret > 0) { assert(ret != NULL); ret->SetInt(u); return 1; } return 0; } while(0)
|
||||
#define ACTION_RETURN_BOOL(v) ACTION_RETURN_INT(v)
|
||||
|
||||
// Checks to see what called the current action function
|
||||
|
|
|
@ -1969,8 +1969,6 @@ static bool DoGiveInventory(AActor *receiver, bool orresult, VM_ARGS)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool res = true;
|
||||
|
||||
if (amount <= 0)
|
||||
{
|
||||
amount = 1;
|
||||
|
|
Loading…
Reference in a new issue