STARTREK: Fix some problems on old compilers

This commit is contained in:
Matthew Stewart 2018-06-15 17:44:43 -04:00 committed by Eugene Sandulenko
parent efda57c114
commit 28debc6673
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@
#include "common/scummsys.h"
namespace Common {
class Rect;
struct Rect;
class Serializer;
}

View File

@ -63,7 +63,7 @@ int IWFile::getClosestKeyPosition(int16 x, int16 y) {
for (int i = 0; i < _numEntries; i++) {
sortedIndices[i].x = i;
sortedIndices[i].y = sqrt(_keyPositions[i].sqrDist(Common::Point(x, y)));
sortedIndices[i].y = (int16)sqrt((double)_keyPositions[i].sqrDist(Common::Point(x, y)));
}
sort(sortedIndices, sortedIndices + _numEntries, &iwSorter);