- Arreglats un milló de warnings tontos (i alguno serio)

This commit is contained in:
2024-10-03 13:40:54 +02:00
parent b44ba3517a
commit 9ca1e59f44
11 changed files with 40 additions and 31 deletions

View File

@@ -1757,7 +1757,7 @@ namespace actor
std::vector<actor_t> actors;
for (auto act : templates)
{
if (act.template_category >= categories.size())
if (act.template_category >= (int)categories.size())
act.template_category = 0;
if (categories[act.template_category] == catname)
actors.push_back(act);
@@ -1783,7 +1783,7 @@ namespace actor
actor_t *getByName(const char *name)
{
for (int i = 0; i < templates.size(); ++i)
for (int i = 0; i < (int)templates.size(); ++i)
if (util::strcomp(name, templates[i].name))
return &templates[i];
// for (auto t : templates) if (util::strcomp(name, t.name)) return &t;
@@ -1837,9 +1837,9 @@ namespace actor
void swapCategories(const int a, const int b)
{
if (a >= categories.size() || a < 0)
if (a >= (int)categories.size() || a < 0)
return;
if (b >= categories.size() || b < 0)
if (b >= (int)categories.size() || b < 0)
return;
auto str = categories[a];
categories[a] = categories[b];