diff --git a/components/esmterrain/storage.cpp b/components/esmterrain/storage.cpp index 8a592bfc8..70ad0a50b 100644 --- a/components/esmterrain/storage.cpp +++ b/components/esmterrain/storage.cpp @@ -155,7 +155,7 @@ namespace ESMTerrain osg::ref_ptr colours) { // LOD level n means every 2^n-th vertex is kept - size_t increment = 1 << lodLevel; + size_t increment = static_cast(1) << lodLevel; osg::Vec2f origin = center - osg::Vec2f(size/2.f, size/2.f); diff --git a/components/terrain/buffercache.cpp b/components/terrain/buffercache.cpp index 40ca1efca..3bf5d5651 100644 --- a/components/terrain/buffercache.cpp +++ b/components/terrain/buffercache.cpp @@ -23,7 +23,7 @@ osg::ref_ptr createIndexBuffer(unsigned int flags, unsigned int bool anyDeltas = (lodDeltas[Terrain::North] || lodDeltas[Terrain::South] || lodDeltas[Terrain::West] || lodDeltas[Terrain::East]); - size_t increment = 1 << lodLevel; + size_t increment = static_cast(1) << lodLevel; assert(increment < verts); osg::ref_ptr indices (new IndexArrayType(osg::PrimitiveSet::TRIANGLES)); @@ -75,7 +75,7 @@ osg::ref_ptr createIndexBuffer(unsigned int flags, unsigned int // South size_t row = 0; - size_t outerStep = 1 << (lodDeltas[Terrain::South] + lodLevel); + size_t outerStep = static_cast(1) << (lodDeltas[Terrain::South] + lodLevel); for (size_t col = 0; col < verts-1; col += outerStep) { indices->push_back(verts*col+row); diff --git a/components/terrain/storage.cpp b/components/terrain/storage.cpp deleted file mode 100644 index bdc819481..000000000 --- a/components/terrain/storage.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "storage.hpp" diff --git a/extern/oics/tinyxml.cpp b/extern/oics/tinyxml.cpp index 5d8eb475a..f1cdc8192 100644 --- a/extern/oics/tinyxml.cpp +++ b/extern/oics/tinyxml.cpp @@ -48,7 +48,7 @@ FILE* TiXmlFOpen( const char* filename, const char* mode ) memset(wname, 0, sizeof(*wname) * (len + 1)); wchar_t wmode[32] = { 0 }; - MultiByteToWideChar(CP_UTF8, 0, filename, len, wname, len); + MultiByteToWideChar(CP_UTF8, 0, filename, static_cast(len), wname, static_cast(len)); MultiByteToWideChar(CP_UTF8, 0, mode, -1, wmode, sizeof(wmode) / sizeof(*wmode)); #if defined(_MSC_VER) && (_MSC_VER >= 1400 )