From 70e4f821ba394840554199f1f84066a8711e454a Mon Sep 17 00:00:00 2001 From: dteviot Date: Mon, 26 Jan 2015 13:58:13 +1300 Subject: [PATCH] Fix Windows warning warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data --- apps/essimporter/importer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/essimporter/importer.cpp b/apps/essimporter/importer.cpp index 10fad37b0..8f6563dee 100644 --- a/apps/essimporter/importer.cpp +++ b/apps/essimporter/importer.cpp @@ -342,8 +342,8 @@ namespace ESSImport { // exterior cell -> determine cell coordinates based on position const int cellSize = 8192; - int cellX = std::floor(context.mPlayer.mObject.mPosition.pos[0]/cellSize); - int cellY = std::floor(context.mPlayer.mObject.mPosition.pos[1]/cellSize); + int cellX = static_cast(std::floor(context.mPlayer.mObject.mPosition.pos[0]/cellSize)); + int cellY = static_cast(std::floor(context.mPlayer.mObject.mPosition.pos[1] / cellSize)); context.mPlayer.mCellId.mIndex.mX = cellX; context.mPlayer.mCellId.mIndex.mY = cellY; }