mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-14 10:49:56 +00:00
Fix MSVC warnings
This commit is contained in:
parent
7b0a498e83
commit
0f20312012
4 changed files with 4 additions and 5 deletions
|
@ -155,7 +155,7 @@ namespace ESMTerrain
|
|||
osg::ref_ptr<osg::Vec4Array> colours)
|
||||
{
|
||||
// LOD level n means every 2^n-th vertex is kept
|
||||
size_t increment = 1 << lodLevel;
|
||||
size_t increment = static_cast<size_t>(1) << lodLevel;
|
||||
|
||||
osg::Vec2f origin = center - osg::Vec2f(size/2.f, size/2.f);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ osg::ref_ptr<IndexArrayType> 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<size_t>(1) << lodLevel;
|
||||
assert(increment < verts);
|
||||
|
||||
osg::ref_ptr<IndexArrayType> indices (new IndexArrayType(osg::PrimitiveSet::TRIANGLES));
|
||||
|
@ -75,7 +75,7 @@ osg::ref_ptr<IndexArrayType> createIndexBuffer(unsigned int flags, unsigned int
|
|||
|
||||
// South
|
||||
size_t row = 0;
|
||||
size_t outerStep = 1 << (lodDeltas[Terrain::South] + lodLevel);
|
||||
size_t outerStep = static_cast<size_t>(1) << (lodDeltas[Terrain::South] + lodLevel);
|
||||
for (size_t col = 0; col < verts-1; col += outerStep)
|
||||
{
|
||||
indices->push_back(verts*col+row);
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
#include "storage.hpp"
|
2
extern/oics/tinyxml.cpp
vendored
2
extern/oics/tinyxml.cpp
vendored
|
@ -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<int>(len), wname, static_cast<int>(len));
|
||||
MultiByteToWideChar(CP_UTF8, 0, mode, -1, wmode, sizeof(wmode) / sizeof(*wmode));
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
|
||||
|
|
Loading…
Reference in a new issue