mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Fix issues detected by Sonar
This commit is contained in:
@@ -348,6 +348,14 @@ std::string CCreature::nodeName() const
|
||||
return "\"" + getNamePluralTextID() + "\"";
|
||||
}
|
||||
|
||||
int CCreature::getRandomAmount(vstd::RNG & ranGen) const
|
||||
{
|
||||
if(ammMax > ammMin)
|
||||
return ammMin + (ranGen.nextInt(ammMin, ammMax));
|
||||
else
|
||||
return ammMax;
|
||||
}
|
||||
|
||||
void CCreature::updateFrom(const JsonNode & data)
|
||||
{
|
||||
JsonUpdater handler(nullptr, data);
|
||||
|
||||
Reference in New Issue
Block a user