Skip to content

Commit

Permalink
Build-fix: passing ArrayVector3 cameraPos and ArrayVector3 cameraDir …
Browse files Browse the repository at this point in the history
…as variable caused problems for x86 build with OGRE_SIMD_SSE2 option. Changed to passing those variables as const references instead.
  • Loading branch information
przemir authored and darksylinc committed Apr 29, 2021
1 parent 646f6ec commit 253e829
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions OgreMain/include/OgreMovableObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,9 @@ namespace Ogre {
*/
static void updateAllBounds( const size_t numNodes, ObjectData t );

static inline ArrayReal calculateCameraDistance( uint32 _cameraSortMode, ArrayVector3 cameraPos,
ArrayVector3 cameraDir,
static inline ArrayReal calculateCameraDistance( uint32 _cameraSortMode,
const ArrayVector3& cameraPos,
const ArrayVector3& cameraDir,
ArrayAabb *RESTRICT_ALIAS worldAabb,
ArrayReal *RESTRICT_ALIAS worldRadius );

Expand Down
4 changes: 2 additions & 2 deletions OgreMain/src/OgreMovableObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ namespace Ogre {
}
//-----------------------------------------------------------------------
inline ArrayReal MovableObject::calculateCameraDistance( uint32 _cameraSortMode,
ArrayVector3 cameraPos,
ArrayVector3 cameraDir,
const ArrayVector3& cameraPos,
const ArrayVector3& cameraDir,
ArrayAabb *RESTRICT_ALIAS worldAabb,
ArrayReal *RESTRICT_ALIAS worldRadius )
{
Expand Down

0 comments on commit 253e829

Please sign in to comment.