Merge pull request #380 from diamante0018/goofy-warnings
Fix some justified warnings & more
This commit is contained in:
commit
b52142bbb1
@ -355,7 +355,7 @@ namespace Components
|
||||
{
|
||||
const auto* ent = Game::GetPlayerEntity(entref);
|
||||
|
||||
if (Game::Scr_GetNumParam() >= 1u)
|
||||
if (Game::Scr_GetNumParam() >= 1)
|
||||
{
|
||||
if (Game::Scr_GetInt(0))
|
||||
{
|
||||
@ -376,7 +376,7 @@ namespace Components
|
||||
{
|
||||
const auto* ent = Game::GetPlayerEntity(entref);
|
||||
|
||||
if (Game::Scr_GetNumParam() >= 1u)
|
||||
if (Game::Scr_GetNumParam() >= 1)
|
||||
{
|
||||
if (Game::Scr_GetInt(0))
|
||||
{
|
||||
@ -397,7 +397,7 @@ namespace Components
|
||||
{
|
||||
auto* ent = Game::GetEntity(entref);
|
||||
|
||||
if (Game::Scr_GetNumParam() >= 1u)
|
||||
if (Game::Scr_GetNumParam() >= 1)
|
||||
{
|
||||
if (Game::Scr_GetInt(0))
|
||||
{
|
||||
@ -418,7 +418,7 @@ namespace Components
|
||||
{
|
||||
auto* ent = Game::GetEntity(entref);
|
||||
|
||||
if (Game::Scr_GetNumParam() >= 1u)
|
||||
if (Game::Scr_GetNumParam() >= 1)
|
||||
{
|
||||
if (Game::Scr_GetInt(0))
|
||||
{
|
||||
@ -439,7 +439,7 @@ namespace Components
|
||||
{
|
||||
auto* ent = Game::GetEntity(entref);
|
||||
|
||||
if (Game::Scr_GetNumParam() >= 1u)
|
||||
if (Game::Scr_GetNumParam() >= 1)
|
||||
{
|
||||
if (Game::Scr_GetInt(0))
|
||||
{
|
||||
|
@ -495,7 +495,7 @@ namespace Components
|
||||
return "";
|
||||
}
|
||||
|
||||
const auto value = &Game::scrVmPub->top[-index];
|
||||
const auto* value = &Game::scrVmPub->top[-index];
|
||||
|
||||
if (value->type != Game::scrParamType_t::VAR_FUNCTION)
|
||||
{
|
||||
|
@ -189,14 +189,14 @@ namespace Components
|
||||
|
||||
Script::AddFunction("IsArray", [] // gsc: iw4x_IsArray(<object>)
|
||||
{
|
||||
const auto type = Game::Scr_GetType(0);
|
||||
auto type = Game::Scr_GetType(0);
|
||||
|
||||
bool result;
|
||||
if (type == Game::VAR_POINTER)
|
||||
{
|
||||
const auto ptr_type = Game::Scr_GetPointerType(0);
|
||||
assert(ptr_type >= Game::FIRST_OBJECT);
|
||||
result = (ptr_type == Game::VAR_ARRAY);
|
||||
type = Game::Scr_GetPointerType(0);
|
||||
assert(type >= Game::FIRST_OBJECT);
|
||||
result = (type == Game::VAR_ARRAY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ namespace Components
|
||||
|
||||
if (i + size >= sizeof(cmpData))
|
||||
{
|
||||
Logger::Print("Error: Writing compressed demo baseline exceeded buffer\n");
|
||||
Logger::PrintError(Game::CON_CHANNEL_ERROR, "Writing compressed demo baseline exceeded buffer\n");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,7 @@ namespace Components
|
||||
if (name == nullptr)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1SetName: Illegal parameter!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Logger::Debug("Setting name of {} to {}", ent->s.number, name);
|
||||
@ -76,6 +77,7 @@ namespace Components
|
||||
if (clanName == nullptr)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1SetClanTag: Illegal parameter!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Logger::Debug("Setting clanName of {} to {}", ent->s.number, clanName);
|
||||
|
Loading…
Reference in New Issue
Block a user