mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Replaced vstd clamp with std version
This commit is contained in:
@@ -66,15 +66,14 @@ void CCreGenAsCastleInfo::serializeJson(JsonSerializeFormat & handler)
|
||||
|
||||
void CCreGenLeveledInfo::serializeJson(JsonSerializeFormat & handler)
|
||||
{
|
||||
handler.serializeInt("minLevel", minLevel, static_cast<ui8>(1));
|
||||
handler.serializeInt("maxLevel", maxLevel, static_cast<ui8>(7));
|
||||
handler.serializeInt("minLevel", minLevel, static_cast<uint8_t>(1));
|
||||
handler.serializeInt("maxLevel", maxLevel, static_cast<uint8_t>(7));
|
||||
|
||||
if(!handler.saving)
|
||||
{
|
||||
//todo: safely allow any level > 7
|
||||
vstd::amax(minLevel, 1);
|
||||
vstd::amin(minLevel, 7);
|
||||
vstd::abetween(maxLevel, minLevel, 7);
|
||||
vstd::abetween<uint8_t>(minLevel, 1, 7);
|
||||
vstd::abetween<uint8_t>(maxLevel, minLevel, 7);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user