1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-17 20:58:07 +02:00

Merge pull request #5010 from Laserlicht/fix_warning

fix some warnings
This commit is contained in:
Ivan Savenko 2024-12-02 13:13:53 +02:00 committed by GitHub
commit fb7091e51a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -49,7 +49,8 @@ void ButtonBase::update()
// hero movement speed buttons: only three frames: normal, pressed and blocked/highlighted
if (state == EButtonState::HIGHLIGHTED && image->size() < 4)
image->setFrame(image->size()-1);
image->setFrame(stateToIndex[vstd::to_underlying(state)]);
else
image->setFrame(stateToIndex[vstd::to_underlying(state)]);
}
if (isActive())

View File

@ -422,7 +422,7 @@ static std::string requiredCheck(JsonValidator & validator, const JsonNode & bas
std::string errors;
for(const auto & required : schema.Vector())
{
if (data[required.String()].isNull())
if (data[required.String()].isNull() && data.getModScope() != "core")
errors += validator.makeErrorMessage("Required entry " + required.String() + " is missing");
}
return errors;