Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove NULL #687

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ typedef signed char int8;
#define PROCESSOR_WAITING 0x10000000
#define PROCESSOR_END 0x20000000

#ifndef NULL
#define NULL 0
#endif

#define MASTER_RULE3 3 //Master Rule 3 (2014)
#define NEW_MASTER_RULE 4 //New Master Rule (2017)
#define MASTER_RULE_2020 5 //Master Rule 2020
Expand Down
4 changes: 2 additions & 2 deletions libcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2371,7 +2371,7 @@ int32 scriptlib::card_is_can_be_placed_on_field(lua_State *L) {
if(lua_gettop(L) >= 3)
tolocation = (uint32)lua_tointeger(L, 3);
if(pcard->is_status(STATUS_FORBIDDEN)
|| pcard->pduel->game_field->check_unique_onfield(pcard, toplayer, tolocation, NULL))
|| pcard->pduel->game_field->check_unique_onfield(pcard, toplayer, tolocation, nullptr))
lua_pushboolean(L, 0);
else
lua_pushboolean(L, 1);
Expand Down Expand Up @@ -3696,7 +3696,7 @@ static const struct luaL_Reg cardlib[] = {
{ "ResetNegateEffect", scriptlib::card_reset_negate_effect },
{ "AssumeProperty", scriptlib::card_assume_prop },
{ "SetSPSummonOnce", scriptlib::card_set_spsummon_once },
{ NULL, NULL }
{ nullptr, nullptr }
};
void scriptlib::open_cardlib(lua_State *L) {
luaL_newlib(L, cardlib);
Expand Down
2 changes: 1 addition & 1 deletion libdebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static const struct luaL_Reg debuglib[] = {
{ "ReloadFieldEnd", scriptlib::debug_reload_field_end },
{ "SetAIName", scriptlib::debug_set_ai_name },
{ "ShowHint", scriptlib::debug_show_hint },
{ NULL, NULL }
{ nullptr, nullptr }
};
void scriptlib::open_debuglib(lua_State *L) {
luaL_newlib(L, debuglib);
Expand Down
2 changes: 1 addition & 1 deletion libduel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5030,7 +5030,7 @@ static const struct luaL_Reg duellib[] = {
{ "IsAbleToEnterBP", scriptlib::duel_is_able_to_enter_bp },
{ "SwapDeckAndGrave", scriptlib::duel_swap_deck_and_grave },
{ "MajesticCopy", scriptlib::duel_majestic_copy },
{ NULL, NULL }
{ nullptr, nullptr }
};
void scriptlib::open_duellib(lua_State *L) {
luaL_newlib(L, duellib);
Expand Down
2 changes: 1 addition & 1 deletion libeffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ static const struct luaL_Reg effectlib[] = {
{ "GetActivateSequence", scriptlib::effect_get_activate_sequence },
{ "CheckCountLimit", scriptlib::effect_check_count_limit },
{ "UseCountLimit", scriptlib::effect_use_count_limit },
{ NULL, NULL }
{ nullptr, nullptr }
};
void scriptlib::open_effectlib(lua_State *L) {
luaL_newlib(L, effectlib);
Expand Down
2 changes: 1 addition & 1 deletion libgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ static const struct luaL_Reg grouplib[] = {
{ "__sub", scriptlib::group_meta_sub },
{ "__band", scriptlib::group_meta_band },
{ "__bxor", scriptlib::group_meta_bxor },
{ NULL, NULL }
{ nullptr, nullptr }
};
void scriptlib::open_grouplib(lua_State *L) {
luaL_newlib(L, grouplib);
Expand Down