mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 14:55:36 +03:00
Fix signed/unsigned mismatch warning (#428)
* Fix signed/unsigned mismatch warning * Fix GCC type warnings
This commit is contained in:
parent
2863455185
commit
2d049b7ff3
@ -589,7 +589,7 @@ const char *CLangMngr::GetLangName(int langId)
|
|||||||
{
|
{
|
||||||
for (size_t iter = 0; iter < m_Languages.length(); ++iter)
|
for (size_t iter = 0; iter < m_Languages.length(); ++iter)
|
||||||
{
|
{
|
||||||
if (iter == langId)
|
if ((int)iter == langId)
|
||||||
{
|
{
|
||||||
return m_Languages[iter]->GetName();
|
return m_Languages[iter]->GetName();
|
||||||
}
|
}
|
||||||
|
@ -3166,7 +3166,7 @@ static cell AMX_NATIVE_CALL register_logevent(AMX *amx, cell *params)
|
|||||||
auto logevent = LogEventHandles.lookup(handle)->m_logevent;
|
auto logevent = LogEventHandles.lookup(handle)->m_logevent;
|
||||||
auto numparam = *params / sizeof(cell);
|
auto numparam = *params / sizeof(cell);
|
||||||
|
|
||||||
for (auto i = 3; i <= numparam; ++i)
|
for (auto i = 3U; i <= numparam; ++i)
|
||||||
{
|
{
|
||||||
logevent->registerFilter(get_amxstring(amx, params[i], 0, length));
|
logevent->registerFilter(get_amxstring(amx, params[i], 0, length));
|
||||||
}
|
}
|
||||||
|
@ -601,7 +601,7 @@ static cell AMX_NATIVE_CALL amx_fputs(AMX *amx, cell *params)
|
|||||||
++length;
|
++length;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fp->Write(string, length) != length)
|
if (fp->Write(string, length) != (size_t)length)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ SMCResult CsItemInfo::ReadSMC_KeyValue(const SMCStates *states, const char *key,
|
|||||||
CSI_NONE, CSI_VEST, CSI_VESTHELM, CSI_FLASHBANG, CSI_HEGRENADE, CSI_SMOKEGRENADE, CSI_NVGS, CSI_DEFUSER
|
CSI_NONE, CSI_VEST, CSI_VESTHELM, CSI_FLASHBANG, CSI_HEGRENADE, CSI_SMOKEGRENADE, CSI_NVGS, CSI_DEFUSER
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_LENGTH(equipmentsList); ++i)
|
for (size_t i = 0; i < ARRAY_LENGTH(equipmentsList); ++i)
|
||||||
{
|
{
|
||||||
if (m_AliasInfo.itemid == equipmentsList[i])
|
if (m_AliasInfo.itemid == equipmentsList[i])
|
||||||
{
|
{
|
||||||
@ -173,7 +173,7 @@ bool CsItemInfo::GetAliasFromId(size_t id, ke::AString &name, ke::AString &altna
|
|||||||
{
|
{
|
||||||
for (auto iter = m_BuyAliasesList.iter(); !iter.empty(); iter.next())
|
for (auto iter = m_BuyAliasesList.iter(); !iter.empty(); iter.next())
|
||||||
{
|
{
|
||||||
if (iter->value.itemid == id)
|
if (iter->value.itemid == (int)id)
|
||||||
{
|
{
|
||||||
name = iter->key;
|
name = iter->key;
|
||||||
altname = iter->value.alt_alias;
|
altname = iter->value.alt_alias;
|
||||||
|
Loading…
Reference in New Issue
Block a user