From: Peter Sadrozinski Date: Sun, 6 Apr 2014 16:14:44 +0000 (-0400) Subject: fix windows build X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=19481983e5e67c60603acb41d42ff406751ada0c;p=simgear.git fix windows build --- diff --git a/simgear/io/sg_binobj.cxx b/simgear/io/sg_binobj.cxx index 5e5dafff..28dd626d 100644 --- a/simgear/io/sg_binobj.cxx +++ b/simgear/io/sg_binobj.cxx @@ -240,8 +240,8 @@ static void read_indices(char* buffer, vai_list& vas ) { - const int indexSize = sizeof(T) * std::bitset<32>(indexMask).count(); - const int vaSize = sizeof(T) * std::bitset<32>(vaMask).count(); + const int indexSize = sizeof(T) * std::bitset<32>((int)indexMask).count(); + const int vaSize = sizeof(T) * std::bitset<32>((int)vaMask).count(); const int count = bytes / (indexSize + vaSize); // fix endian-ness of the whole lot, if required @@ -307,8 +307,8 @@ void write_indices(gzFile fp, const vai_list& vas ) { unsigned int count = vertices.size(); - const int indexSize = sizeof(T) * std::bitset<32>(indexMask).count(); - const int vaSize = sizeof(T) * std::bitset<32>(vaMask).count(); + const int indexSize = sizeof(T) * std::bitset<32>((int)indexMask).count(); + const int vaSize = sizeof(T) * std::bitset<32>((int)vaMask).count(); sgWriteUInt(fp, (indexSize + vaSize) * count); for (unsigned int i=0; i < count; ++i) { @@ -437,7 +437,7 @@ void SGBinObject::read_object( gzFile fp, throw sg_exception("Error reading object properties"); } - size_t indexCount = std::bitset<32>(idx_mask).count(); + size_t indexCount = std::bitset<32>((int)idx_mask).count(); if (indexCount == 0) { throw sg_exception("object index mask has no bits set"); }