From 64214e1a7beecabe4c2b1d1af000d9bef92ce762 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 15 Dec 2012 18:23:33 -0800 Subject: [PATCH] Corrections as proposed by @branan. --- CMakeLists.txt | 5 ++++- Sources/Plasma/FeatureLib/pfAnimation/plLightModifier.cpp | 2 +- Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.cpp | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3f43b77..6ccfb687 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,11 @@ if(WIN32 AND NOT CYGWIN) endif(WIN32 AND NOT CYGWIN) if(UNIX) add_definitions(-DHS_BUILD_FOR_UNIX) - add_definitions(-std=c++0x) endif(UNIX) + +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + add_definitions(-std=c++0x) +endif() # End HeadSpin Configuration set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plLightModifier.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plLightModifier.cpp index 90422247..d0569982 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plLightModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plLightModifier.cpp @@ -90,7 +90,7 @@ void plLightModifier::AddTarget(plSceneObject* so) void plLightModifier::RemoveTarget(plSceneObject* so) { - if ((so = fTarget)) + if (so == fTarget) fLight = nil; plSimpleModifier::RemoveTarget(so); } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.cpp index c56b91bd..337e524c 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.cpp @@ -291,7 +291,8 @@ void plSpaceTree::HarvestEnabledLeaves(plVolumeIsect* cull, const hsBitVector& c if( IsEmpty() ) return; - if((fCullFunc = cull)) + fCullFunc = cull; + if (fCullFunc) IHarvestAndCullEnabledLeaves(fRoot, cache, list); else IHarvestEnabledLeaves(fRoot, cache, list); @@ -372,7 +373,8 @@ void plSpaceTree::HarvestLeaves(plVolumeIsect* cull, hsBitVector& list) const { if( !IsEmpty() ) { - if((fCullFunc = cull)) + fCullFunc = cull; + if (fCullFunc) IHarvestAndCullLeaves(fTree[fRoot], scratchTotVec, list); else IHarvestLeaves(fTree[fRoot], scratchTotVec, list);