1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

* fixed vector<bool> serialization

* refactoring
This commit is contained in:
mateuszb
2013-02-04 19:43:16 +00:00
parent 5b00d74e1a
commit 25663ce7af
34 changed files with 300 additions and 288 deletions

View File

@ -369,7 +369,7 @@ void CArtHandler::loadArtifacts(bool onlyTxt)
BOOST_FOREACH(ui32 constituentID, *artifact->constituents)
{
if (artifacts[constituentID]->constituentOf == NULL)
artifacts[constituentID]->constituentOf = new std::vector<ui32>();
artifacts[constituentID]->constituentOf = new std::vector<TArtifactID>();
artifacts[constituentID]->constituentOf->push_back(artifact->id);
}
}
@ -747,7 +747,7 @@ void CArtHandler::readComponents (const JsonNode & node, CArtifact * art)
value = &node["components"];
if (!value->isNull())
{
art->constituents = new std::vector<ui32>();
art->constituents = new std::vector<TArtifactID>();
BOOST_FOREACH (auto component, value->Vector())
{
VLC->modh->identifiers.requestIdentifier(std::string("artifact.") + component.String(),