From 19481983e5e67c60603acb41d42ff406751ada0c Mon Sep 17 00:00:00 2001 From: Peter Sadrozinski Date: Sun, 6 Apr 2014 12:14:44 -0400 Subject: [PATCH] fix windows build --- simgear/io/sg_binobj.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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"); } -- 2.39.5