mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Fixed lots of warnings.
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed. 4003: not enough actual parameters for macro 'identifier' 4250: 'class1' : inherits 'class2::member' via dominance 4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2' 4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
This commit is contained in:
@@ -98,7 +98,7 @@ void Graphics::initializeBattleGraphics()
|
||||
const JsonNode config(ResourceID("config/battles_graphics.json"));
|
||||
|
||||
// Reserve enough space for the terrains
|
||||
int idx = config["backgrounds"].Vector().size();
|
||||
int idx = static_cast<int>(config["backgrounds"].Vector().size());
|
||||
battleBacks.resize(idx+1); // 1 to idx, 0 is unused
|
||||
|
||||
idx = 1;
|
||||
@@ -109,7 +109,7 @@ void Graphics::initializeBattleGraphics()
|
||||
|
||||
//initialization of AC->def name mapping
|
||||
for(const JsonNode &ac : config["ac_mapping"].Vector()) {
|
||||
int ACid = ac["id"].Float();
|
||||
int ACid = static_cast<int>(ac["id"].Float());
|
||||
std::vector< std::string > toAdd;
|
||||
|
||||
for(const JsonNode &defname : ac["defnames"].Vector()) {
|
||||
@@ -428,7 +428,7 @@ void Graphics::addImageListEntry(size_t index, std::string listName, std::string
|
||||
if (!imageName.empty())
|
||||
{
|
||||
JsonNode entry;
|
||||
entry["frame"].Float() = index;
|
||||
entry["frame"].Float() = static_cast<double>(index);
|
||||
entry["file"].String() = imageName;
|
||||
|
||||
imageLists["SPRITES/" + listName]["images"].Vector().push_back(entry);
|
||||
|
||||
Reference in New Issue
Block a user