From f21436a29e7298468408656ee39b2e4a6d933d07 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Mon, 13 Jan 2014 15:02:46 -0800 Subject: [PATCH] Fix (hopefully) for warning on Windows build. --- interface/src/Application.cpp | 4 +--- libraries/metavoxels/src/MetavoxelData.cpp | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 8d758974dd..5a6aec5fe8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2244,9 +2244,7 @@ void Application::updateHoverVoxels(float deltaTime, glm::vec3& mouseRayOrigin, if (!(_voxels.treeIsBusy() || _mousePressed)) { { PerformanceWarning warn(showWarnings, "Application::updateHoverVoxels() _voxels.findRayIntersection()"); - const float MAX_HOVER_DISTANCE = 100.0f; - _isHoverVoxel = _voxels.findRayIntersection(mouseRayOrigin, mouseRayDirection, _hoverVoxel, distance, face) && - glm::distance(getMouseVoxelWorldCoordinates(_hoverVoxel), mouseRayOrigin) < MAX_HOVER_DISTANCE; + _isHoverVoxel = _voxels.findRayIntersection(mouseRayOrigin, mouseRayDirection, _hoverVoxel, distance, face); } if (MAKE_SOUND_ON_VOXEL_HOVER && _isHoverVoxel && glm::vec4(_hoverVoxel.x, _hoverVoxel.y, _hoverVoxel.z, _hoverVoxel.s) != oldVoxel) { diff --git a/libraries/metavoxels/src/MetavoxelData.cpp b/libraries/metavoxels/src/MetavoxelData.cpp index 849d85960e..c04ee9f297 100644 --- a/libraries/metavoxels/src/MetavoxelData.cpp +++ b/libraries/metavoxels/src/MetavoxelData.cpp @@ -301,8 +301,8 @@ void MetavoxelNode::clearChildren(const AttributePointer& attribute) { } int MetavoxelPath::operator[](int index) const { - return _array.at(index * BITS_PER_ELEMENT) | (_array.at(index * BITS_PER_ELEMENT + 1) << 1) | - (_array.at(index * BITS_PER_ELEMENT + 2) << 2); + return (int)_array.at(index * BITS_PER_ELEMENT) | ((int)_array.at(index * BITS_PER_ELEMENT + 1) << 1) | + ((int)_array.at(index * BITS_PER_ELEMENT + 2) << 2); } MetavoxelPath& MetavoxelPath::operator+=(int element) {