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

Commit cbbd119

Browse files
committed
Fix Windows x64 build (casting etc.)
1 parent bea2975 commit cbbd119

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/map/lua/lua_baseentity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6854,7 +6854,7 @@ inline int32 CLuaBaseEntity::setEminenceProgress(lua_State *L)
68546854
bool result = charutils::SetEminenceRecordProgress(PChar, recordID, progress);
68556855
lua_pushboolean(L, result);
68566856

6857-
uint32 total = lua_tointeger(L, 3);
6857+
uint32 total = static_cast<int32>(lua_tointeger(L, 3));
68586858
if (total)
68596859
{
68606860
PChar->pushPacket(new CMessageBasicPacket(PChar, PChar, recordID, 0, MSGBASIC_ROE_RECORD));

src/map/lua/luautils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ namespace luautils
10821082

10831083
if (lua_isnumber(L, 1))
10841084
{
1085-
int32 trial = (lua_tointeger(L, 1));
1085+
int32 trial = static_cast<int32>(lua_tointeger(L, 1));
10861086
int32 field {0};
10871087
lua_newtable(L);
10881088
if (Sql_Query(SqlHandle, Query, trial) != SQL_ERROR && Sql_NumRows(SqlHandle) != 0 && Sql_NextRow(SqlHandle) == SQL_SUCCESS)
@@ -1099,7 +1099,7 @@ namespace luautils
10991099
{
11001100
// parse provided trial's from table
11011101
std::vector<int32> trials;
1102-
for(int i = 1, j = lua_objlen(L,1); i <= j; i++)
1102+
for(size_t i = 1, j = lua_objlen(L, 1); i <= j; i++)
11031103
{
11041104
lua_pushinteger(L, i);
11051105
lua_gettable(L, 1);
@@ -1108,7 +1108,7 @@ namespace luautils
11081108
lua_pop(L, 1);
11091109
continue;
11101110
}
1111-
trials.push_back(lua_tointeger(L, -1));
1111+
trials.push_back(static_cast<int32>(lua_tointeger(L, -1)));
11121112
lua_pop(L, 1);
11131113
}
11141114

@@ -1154,7 +1154,7 @@ namespace luautils
11541154

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

11601160
int32 ret = Sql_Query(SqlHandle, Query, parentTrial);
@@ -4455,7 +4455,7 @@ namespace luautils
44554455
{
44564456
TPZ_DEBUG_BREAK_IF(lua_isnil(L, -1) || !lua_isnumber(L, -1));
44574457

4458-
uint32 id = lua_tointeger(L, 1);
4458+
uint32 id = static_cast<uint32>(lua_tointeger(L, 1));
44594459
CItem* PItem = itemutils::GetItemPointer(id);
44604460
if (PItem)
44614461
{

0 commit comments

Comments
 (0)