mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Remove unused constructor
This commit is contained in:
parent
184f5a72cc
commit
cac37df334
@ -25,19 +25,6 @@ ResourceSet::ResourceSet(const JsonNode & node)
|
|||||||
container[i] = static_cast<int>(node[GameConstants::RESOURCE_NAMES[i]].Float());
|
container[i] = static_cast<int>(node[GameConstants::RESOURCE_NAMES[i]].Float());
|
||||||
}
|
}
|
||||||
|
|
||||||
ResourceSet::ResourceSet(TResource wood, TResource mercury, TResource ore, TResource sulfur, TResource crystal,
|
|
||||||
TResource gems, TResource gold, TResource mithril)
|
|
||||||
{
|
|
||||||
container[GameResID(EGameResID::WOOD)] = wood;
|
|
||||||
container[GameResID(EGameResID::MERCURY)] = mercury;
|
|
||||||
container[GameResID(EGameResID::ORE)] = ore;
|
|
||||||
container[GameResID(EGameResID::SULFUR)] = sulfur;
|
|
||||||
container[GameResID(EGameResID::CRYSTAL)] = crystal;
|
|
||||||
container[GameResID(EGameResID::GEMS)] = gems;
|
|
||||||
container[GameResID(EGameResID::GOLD)] = gold;
|
|
||||||
container[GameResID(EGameResID::MITHRIL)] = mithril;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ResourceSet::serializeJson(JsonSerializeFormat & handler, const std::string & fieldName)
|
void ResourceSet::serializeJson(JsonSerializeFormat & handler, const std::string & fieldName)
|
||||||
{
|
{
|
||||||
if(handler.saving && !nonZero())
|
if(handler.saving && !nonZero())
|
||||||
|
@ -26,12 +26,11 @@ class ResourceSet;
|
|||||||
class ResourceSet
|
class ResourceSet
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::array<TResource, GameConstants::RESOURCE_QUANTITY> container;
|
std::array<TResource, GameConstants::RESOURCE_QUANTITY> container = {};
|
||||||
public:
|
public:
|
||||||
// read resources set from json. Format example: { "gold": 500, "wood":5 }
|
// read resources set from json. Format example: { "gold": 500, "wood":5 }
|
||||||
DLL_LINKAGE ResourceSet(const JsonNode & node);
|
DLL_LINKAGE ResourceSet(const JsonNode & node);
|
||||||
DLL_LINKAGE ResourceSet(TResource wood = 0, TResource mercury = 0, TResource ore = 0, TResource sulfur = 0, TResource crystal = 0,
|
DLL_LINKAGE ResourceSet() = default;
|
||||||
TResource gems = 0, TResource gold = 0, TResource mithril = 0);
|
|
||||||
|
|
||||||
|
|
||||||
#define scalarOperator(OPSIGN) \
|
#define scalarOperator(OPSIGN) \
|
||||||
|
Loading…
Reference in New Issue
Block a user