Browse Source

Fixing clang compilation errors

BearishSun 8 years ago
parent
commit
bb6b9d1185

+ 1 - 1
Source/BansheeCore/Include/BsComponent.h

@@ -141,7 +141,7 @@ namespace bs
 		bool supportsNotify(TransformChangedFlags flags) const { return (mNotifyFlags & flags) != 0; }
 
 		/** Enables or disabled a flag controlling component's behaviour. */
-		void setFlag(ComponentFlag flag, bool enabled) { enabled ? mFlags.set(flag) : mFlags.unset(flag); }
+		void setFlag(ComponentFlag flag, bool enabled) { if (enabled) mFlags.set(flag); else mFlags.unset(flag); }
 
 		/** Checks if the component has a certain flag enabled. */
 		bool hasFlag(ComponentFlag flag) const { return mFlags.isSet(flag); }

+ 1 - 0
Source/BansheeCore/Include/BsGpuProgramRTTI.h

@@ -5,6 +5,7 @@
 #include "BsCorePrerequisites.h"
 #include "BsRTTIType.h"
 #include "BsGpuProgram.h"
+#include "BsGpuProgramManager.h"
 
 namespace bs
 {

+ 0 - 2
Source/BansheeCore/Include/BsPhysics.h

@@ -557,8 +557,6 @@ namespace bs
 
 		bool mUpdateInProgress = false;
 		PhysicsFlags mFlags;
-
-		const static UINT32 MAX_PRIORITY = 128;
 	};
 
 	/** Provides easier access to Physics. */

+ 1 - 1
Source/BansheeEditor/Include/BsGizmoManager.h

@@ -505,7 +505,7 @@ namespace bs
 		BS_PARAM_BLOCK_ENTRY(Vector4, gViewDir)
 	BS_PARAM_BLOCK_END
 
-	extern GizmoParamBlockDef gHandleParamBlockDef;
+	extern GizmoParamBlockDef gGizmoParamBlockDef;
 
 	BS_PARAM_BLOCK_BEGIN(GizmoPickingParamBlockDef)
 		BS_PARAM_BLOCK_ENTRY(Matrix4, gMatViewProj)

+ 7 - 7
Source/BansheeEditor/Source/BsGizmoManager.cpp

@@ -905,7 +905,7 @@ namespace bs
 
 	namespace ct
 	{
-	GizmoParamBlockDef gHandleParamBlockDef;
+	GizmoParamBlockDef gGizmoParamBlockDef;
 	GizmoPickingParamBlockDef gGizmoPickingParamBlockDef;
 
 	const float GizmoRenderer::PICKING_ALPHA_CUTOFF = 0.5f;
@@ -929,8 +929,8 @@ namespace bs
 		mPickingMaterials[0] = initData.pickingMat;
 		mPickingMaterials[1] = initData.alphaPickingMat;
 
-		mMeshGizmoBuffer = gHandleParamBlockDef.createBuffer();
-		mIconGizmoBuffer = gHandleParamBlockDef.createBuffer();
+		mMeshGizmoBuffer = gGizmoParamBlockDef.createBuffer();
+		mIconGizmoBuffer = gGizmoParamBlockDef.createBuffer();
 		mMeshPickingParamBuffer = gGizmoPickingParamBlockDef.createBuffer();
 		mIconPickingParamBuffer = gGizmoPickingParamBlockDef.createBuffer();
 	}
@@ -1027,8 +1027,8 @@ namespace bs
 
 		if (!usePickingMaterial)
 		{
-			gHandleParamBlockDef.gMatViewProj.set(mMeshGizmoBuffer, viewProjMat);
-			gHandleParamBlockDef.gViewDir.set(mMeshGizmoBuffer, (Vector4)camera->getForward());
+			gGizmoParamBlockDef.gMatViewProj.set(mMeshGizmoBuffer, viewProjMat);
+			gGizmoParamBlockDef.gViewDir.set(mMeshGizmoBuffer, (Vector4)camera->getForward());
 
 			for (auto& entry : meshes)
 			{
@@ -1133,8 +1133,8 @@ namespace bs
 
 		if (!usePickingMaterial)
 		{
-			gHandleParamBlockDef.gMatViewProj.set(mIconGizmoBuffer, projMat);
-			gHandleParamBlockDef.gViewDir.set(mIconGizmoBuffer, Vector4::ZERO);
+			gGizmoParamBlockDef.gMatViewProj.set(mIconGizmoBuffer, projMat);
+			gGizmoParamBlockDef.gViewDir.set(mIconGizmoBuffer, Vector4::ZERO);
 
 			for (UINT32 passIdx = 0; passIdx < 2; passIdx++)
 			{

+ 2 - 0
Source/BansheeUtility/Include/BsStringFormat.h

@@ -1,5 +1,7 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
 namespace bs
 {
 	/** @addtogroup Internal-Utility