Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Fix Windows x64 build (casting etc.)
Browse files Browse the repository at this point in the history
  • Loading branch information
zach2good committed Sep 5, 2020
1 parent bea2975 commit cbbd119
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/map/lua/lua_baseentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6854,7 +6854,7 @@ inline int32 CLuaBaseEntity::setEminenceProgress(lua_State *L)
bool result = charutils::SetEminenceRecordProgress(PChar, recordID, progress);
lua_pushboolean(L, result);

uint32 total = lua_tointeger(L, 3);
uint32 total = static_cast<int32>(lua_tointeger(L, 3));
if (total)
{
PChar->pushPacket(new CMessageBasicPacket(PChar, PChar, recordID, 0, MSGBASIC_ROE_RECORD));
Expand Down
10 changes: 5 additions & 5 deletions src/map/lua/luautils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ namespace luautils

if (lua_isnumber(L, 1))
{
int32 trial = (lua_tointeger(L, 1));
int32 trial = static_cast<int32>(lua_tointeger(L, 1));
int32 field {0};
lua_newtable(L);
if (Sql_Query(SqlHandle, Query, trial) != SQL_ERROR && Sql_NumRows(SqlHandle) != 0 && Sql_NextRow(SqlHandle) == SQL_SUCCESS)
Expand All @@ -1099,7 +1099,7 @@ namespace luautils
{
// parse provided trial's from table
std::vector<int32> trials;
for(int i = 1, j = lua_objlen(L,1); i <= j; i++)
for(size_t i = 1, j = lua_objlen(L, 1); i <= j; i++)
{
lua_pushinteger(L, i);
lua_gettable(L, 1);
Expand All @@ -1108,7 +1108,7 @@ namespace luautils
lua_pop(L, 1);
continue;
}
trials.push_back(lua_tointeger(L, -1));
trials.push_back(static_cast<int32>(lua_tointeger(L, -1)));
lua_pop(L, 1);
}

Expand Down Expand Up @@ -1154,7 +1154,7 @@ namespace luautils

if (lua_isnumber(L, 1))
{
int32 parentTrial = lua_tointeger(L, 1);
int32 parentTrial = static_cast<int32>(lua_tointeger(L, 1));
const char* Query = "SELECT `trialId` from `magian` WHERE `previousTrial` = %u;";

int32 ret = Sql_Query(SqlHandle, Query, parentTrial);
Expand Down Expand Up @@ -4455,7 +4455,7 @@ namespace luautils
{
TPZ_DEBUG_BREAK_IF(lua_isnil(L, -1) || !lua_isnumber(L, -1));

uint32 id = lua_tointeger(L, 1);
uint32 id = static_cast<uint32>(lua_tointeger(L, 1));
CItem* PItem = itemutils::GetItemPointer(id);
if (PItem)
{
Expand Down

0 comments on commit cbbd119

Please sign in to comment.