瀏覽代碼

Engine / Editor / OpenGLRenderAPI now compiles using Clang with no warnings

BearishSun 9 年之前
父節點
當前提交
cca31b40af
共有 100 個文件被更改,包括 274 次插入322 次删除
  1. 1 1
      Documentation/Manuals/Native/coreThread.md
  2. 1 1
      Documentation/Manuals/Native/utilities.md
  3. 1 1
      Source/BansheeCore/Include/BsRenderAPIFactory.h
  4. 3 3
      Source/BansheeCore/Source/BsRenderAPIManager.cpp
  5. 2 2
      Source/BansheeD3D11RenderAPI/Include/BsD3D11RenderAPIFactory.h
  6. 1 1
      Source/BansheeD3D11RenderAPI/Source/BsD3D11Plugin.cpp
  7. 2 2
      Source/BansheeD3D9RenderAPI/Include/BsD3D9RenderAPIFactory.h
  8. 1 1
      Source/BansheeD3D9RenderAPI/Source/BsD3D9Plugin.cpp
  9. 1 1
      Source/BansheeEditor/Include/BsCmdInputFieldValueChange.h
  10. 0 1
      Source/BansheeEditor/Include/BsGUIDockSlider.h
  11. 6 0
      Source/BansheeEditor/Source/BsBuildManager.cpp
  12. 2 2
      Source/BansheeEditor/Source/BsCmdDeleteSO.cpp
  13. 2 2
      Source/BansheeEditor/Source/BsCmdRecordSO.cpp
  14. 10 7
      Source/BansheeEditor/Source/BsDockManager.cpp
  15. 2 2
      Source/BansheeEditor/Source/BsDropDownWindow.cpp
  16. 2 2
      Source/BansheeEditor/Source/BsEditorApplication.cpp
  17. 3 3
      Source/BansheeEditor/Source/BsEditorSettings.cpp
  18. 2 2
      Source/BansheeEditor/Source/BsEditorWidget.cpp
  19. 2 2
      Source/BansheeEditor/Source/BsEditorWidgetContainer.cpp
  20. 2 2
      Source/BansheeEditor/Source/BsGUIColorField.cpp
  21. 1 2
      Source/BansheeEditor/Source/BsGUIDockSlider.cpp
  22. 3 3
      Source/BansheeEditor/Source/BsGUIFloatField.cpp
  23. 3 3
      Source/BansheeEditor/Source/BsGUIIntField.cpp
  24. 2 2
      Source/BansheeEditor/Source/BsGUIMenuBar.cpp
  25. 2 3
      Source/BansheeEditor/Source/BsGUIResourceTreeView.cpp
  26. 0 6
      Source/BansheeEditor/Source/BsGUISceneTreeView.cpp
  27. 6 6
      Source/BansheeEditor/Source/BsGUIStatusBar.cpp
  28. 4 8
      Source/BansheeEditor/Source/BsGUITabbedTitleBar.cpp
  29. 1 1
      Source/BansheeEditor/Source/BsGUITextField.cpp
  30. 12 11
      Source/BansheeEditor/Source/BsGUITreeView.cpp
  31. 1 1
      Source/BansheeEditor/Source/BsGUIWindowFrameWidget.cpp
  32. 0 2
      Source/BansheeEditor/Source/BsGizmoManager.cpp
  33. 1 1
      Source/BansheeEditor/Source/BsHandleDrawManager.cpp
  34. 2 2
      Source/BansheeEditor/Source/BsHandleManager.cpp
  35. 2 2
      Source/BansheeEditor/Source/BsHandleSlider.cpp
  36. 5 8
      Source/BansheeEditor/Source/BsHandleSliderDisc.cpp
  37. 2 2
      Source/BansheeEditor/Source/BsHandleSliderPlane.cpp
  38. 4 3
      Source/BansheeEditor/Source/BsMainEditorWindow.cpp
  39. 2 2
      Source/BansheeEditor/Source/BsModalWindow.cpp
  40. 3 3
      Source/BansheeEditor/Source/BsProjectLibrary.cpp
  41. 2 0
      Source/BansheeEditor/Source/BsSceneGrid.cpp
  42. 1 3
      Source/BansheeEditor/Source/BsScenePicking.cpp
  43. 2 2
      Source/BansheeEditor/Source/BsUndoRedo.cpp
  44. 1 1
      Source/BansheeEditor/Source/Win32/BsVSCodeEditor.cpp
  45. 3 4
      Source/BansheeEngine/Include/BsGUIElementStyle.h
  46. 2 2
      Source/BansheeEngine/Include/BsGUIInputSelection.h
  47. 1 1
      Source/BansheeEngine/Include/BsGUILayoutData.h
  48. 2 0
      Source/BansheeEngine/Include/BsGameSettings.h
  49. 2 2
      Source/BansheeEngine/Include/BsHEString.h
  50. 2 2
      Source/BansheeEngine/Include/BsImageSprite.h
  51. 1 1
      Source/BansheeEngine/Include/BsRenderQueue.h
  52. 8 8
      Source/BansheeEngine/Include/BsRenderable.h
  53. 0 14
      Source/BansheeEngine/Include/BsSprite.h
  54. 2 2
      Source/BansheeEngine/Source/BsBuiltinResources.cpp
  55. 5 7
      Source/BansheeEngine/Source/BsCamera.cpp
  56. 3 1
      Source/BansheeEngine/Source/BsCursor.cpp
  57. 2 1
      Source/BansheeEngine/Source/BsDragAndDropManager.cpp
  58. 2 1
      Source/BansheeEngine/Source/BsGUIButtonBase.cpp
  59. 5 5
      Source/BansheeEngine/Source/BsGUIDropDownContent.cpp
  60. 8 7
      Source/BansheeEngine/Source/BsGUIDropDownMenu.cpp
  61. 2 2
      Source/BansheeEngine/Source/BsGUIElement.cpp
  62. 4 4
      Source/BansheeEngine/Source/BsGUIElementBase.cpp
  63. 2 13
      Source/BansheeEngine/Source/BsGUIInputBox.cpp
  64. 2 4
      Source/BansheeEngine/Source/BsGUIInputTool.cpp
  65. 2 2
      Source/BansheeEngine/Source/BsGUILayout.cpp
  66. 6 3
      Source/BansheeEngine/Source/BsGUILayoutX.cpp
  67. 6 1
      Source/BansheeEngine/Source/BsGUILayoutY.cpp
  68. 4 4
      Source/BansheeEngine/Source/BsGUIManager.cpp
  69. 2 2
      Source/BansheeEngine/Source/BsGUIMenu.cpp
  70. 3 4
      Source/BansheeEngine/Source/BsGUIMouseEvent.cpp
  71. 5 5
      Source/BansheeEngine/Source/BsGUIScrollArea.cpp
  72. 3 2
      Source/BansheeEngine/Source/BsGUISliderHandle.cpp
  73. 1 2
      Source/BansheeEngine/Source/BsGUITexture.cpp
  74. 1 1
      Source/BansheeEngine/Source/BsGUIToggle.cpp
  75. 1 1
      Source/BansheeEngine/Source/BsGUITooltip.cpp
  76. 4 13
      Source/BansheeEngine/Source/BsGUIWidget.cpp
  77. 0 1
      Source/BansheeEngine/Source/BsImageSprite.cpp
  78. 2 2
      Source/BansheeEngine/Source/BsInputConfiguration.cpp
  79. 6 7
      Source/BansheeEngine/Source/BsLight.cpp
  80. 4 4
      Source/BansheeEngine/Source/BsProfilerOverlay.cpp
  81. 2 0
      Source/BansheeEngine/Source/BsRenderQueue.cpp
  82. 0 1
      Source/BansheeEngine/Source/BsRendererUtility.cpp
  83. 0 4
      Source/BansheeEngine/Source/BsShapeMeshes3D.cpp
  84. 0 4
      Source/BansheeEngine/Source/BsSprite.cpp
  85. 1 1
      Source/BansheeEngine/Source/BsSpriteTexture.cpp
  86. 0 1
      Source/BansheeEngine/Source/BsTextSprite.cpp
  87. 2 2
      Source/BansheeFBXImporter/Source/BsFBXPlugin.cpp
  88. 2 2
      Source/BansheeFontImporter/Source/BsFontPlugin.cpp
  89. 2 2
      Source/BansheeFreeImgImporter/Source/BsFreeImgPlugin.cpp
  90. 2 2
      Source/BansheeGLRenderAPI/Include/BsGLRenderAPIFactory.h
  91. 0 2
      Source/BansheeGLRenderAPI/Source/BsGLFrameBufferObject.cpp
  92. 1 1
      Source/BansheeGLRenderAPI/Source/BsGLMultiRenderTexture.cpp
  93. 1 2
      Source/BansheeGLRenderAPI/Source/BsGLOcclusionQuery.cpp
  94. 3 1
      Source/BansheeGLRenderAPI/Source/BsGLPixelFormat.cpp
  95. 1 1
      Source/BansheeGLRenderAPI/Source/BsGLPlugin.cpp
  96. 38 33
      Source/BansheeGLRenderAPI/Source/BsGLRenderAPI.cpp
  97. 1 6
      Source/BansheeGLRenderAPI/Source/BsGLRenderTexture.cpp
  98. 0 2
      Source/BansheeGLRenderAPI/Source/BsGLSLParamParser.cpp
  99. 1 3
      Source/BansheeGLRenderAPI/Source/BsGLTexture.cpp
  100. 1 2
      Source/BansheeGLRenderAPI/Source/BsGLTimerQuery.cpp

+ 1 - 1
Documentation/Manuals/Native/coreThread.md

@@ -140,7 +140,7 @@ To add dependencies implement the @ref BansheeEngine::CoreObject::getCoreDepende
 ## Deserialization {#coreThread_b_b}
 When creating RTTI for a @ref BansheeEngine::CoreObject "CoreObject", as described in the [RTTI](@ref rtti) manual, you must take care not to fully initialize the object until deserialization of the object's fields is done.
 
-Essentially this means that @ref BansheeEngine::RTTITypeBase::newRTTIObject "RTTIType::newRTTIObject" must return a pointer to the core object on which @ref BansheeEngine::CoreObject::initialize "CoreObject::initialize" hasn't called yet. You must then call @ref BansheeEngine::CoreObject::initialize "CoreObject::initialize" manually in @ref BansheeEngine::RTTITypeBase::onDeserializationEnded "RTTIType::onDeserializationEnded".
+Essentially this means that @ref BansheeEngine::RTTITypeBase::newRTTIObject "RTTIType::newRTTIObject" must return a pointer to the core object on which @ref BansheeEngine::CoreObject::initialize "CoreObject::initialize" hasn't been called yet. You must then call @ref BansheeEngine::CoreObject::initialize "CoreObject::initialize" manually in @ref BansheeEngine::RTTITypeBase::onDeserializationEnded "RTTIType::onDeserializationEnded".
 
 This ensures that @ref BansheeEngine::CoreObject::initialize "CoreObject::initialize" has all the relevant information when it is ran.
 

+ 1 - 1
Documentation/Manuals/Native/utilities.md

@@ -461,7 +461,7 @@ class MyObj
 ~~~~~~~~~~~~~
 
 ## Shared pointers {#utilities_p_e}
-Use @ref BansheeEngine::SPtr "SPtr" for shared pointers. Internally this is just a wrapper for the standard C++ library `std::shared_ptr`. Use @ref BansheeEngine::bs_shared_ptr_new "bs_shared_ptr_new" to create a new shared pointer, or @ref BansheeEngine::bs_shared_ptr "bs_shared_ptr" to create one from an existing instance.
+Shared pointers are smart pointers that will automatically free memory when the last reference to the pointed memory goes out of scope. They're implemented as @ref BansheeEngine::SPtr "SPtr", which is just a wrapper for the standard C++ library `std::shared_ptr`. Use @ref BansheeEngine::bs_shared_ptr_new "bs_shared_ptr_new" to create a new shared pointer, or @ref BansheeEngine::bs_shared_ptr "bs_shared_ptr" to create one from an existing instance. The pointer memory is allocated and freed using the general allocator.
 
 For example:
 ~~~~~~~~~~~~~{.cpp}

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

@@ -20,7 +20,7 @@ namespace BansheeEngine
 		virtual void create() = 0;
 
 		/**	Returns the name of the render system this factory creates. */
-		virtual const String& name() const = 0;
+		virtual const char* name() const = 0;
 	};
 
 	/** @} */

+ 3 - 3
Source/BansheeCore/Source/BsRenderAPIManager.cpp

@@ -27,11 +27,11 @@ namespace BansheeEngine
 			return nullptr;
 
 		DynLib* loadedLibrary = gDynLibManager().load(pluginFilename);
-		String name = "";
+		const char* name = "";
 
 		if(loadedLibrary != nullptr)
 		{
-			typedef const String& (*GetPluginNameFunc)();
+			typedef const char* (*GetPluginNameFunc)();
 
 			GetPluginNameFunc getPluginNameFunc = (GetPluginNameFunc)loadedLibrary->getSymbol("getPluginName");
 			name = getPluginNameFunc();
@@ -39,7 +39,7 @@ namespace BansheeEngine
 
 		for(auto iter = mAvailableFactories.begin(); iter != mAvailableFactories.end(); ++iter)
 		{
-			if((*iter)->name() == name)
+			if(strcmp((*iter)->name(), name) == 0)
 			{
 				(*iter)->create();		
 				mRenderAPIInitialized = true;

+ 2 - 2
Source/BansheeD3D11RenderAPI/Include/BsD3D11RenderAPIFactory.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 	 *  @{
 	 */
 
-	const String SystemName = "BansheeD3D11RenderSystem";
+	const char* SystemName = "BansheeD3D11RenderSystem";
 
 	/**	Handles creation of the DX11 render system. */
 	class D3D11RenderAPIFactory : public RenderAPIFactory
@@ -23,7 +23,7 @@ namespace BansheeEngine
 		void create() override;
 
 		/** @copydoc RenderAPIFactory::name */
-		const String& name() const override { return SystemName; }
+		const char* name() const override { return SystemName; }
 
 	private:
 

+ 1 - 1
Source/BansheeD3D11RenderAPI/Source/BsD3D11Plugin.cpp

@@ -5,7 +5,7 @@
 
 namespace BansheeEngine
 {
-	extern "C" BS_D3D11_EXPORT const String& getPluginName()
+	extern "C" BS_D3D11_EXPORT const char* getPluginName()
 	{
 		return SystemName;
 	}

+ 2 - 2
Source/BansheeD3D9RenderAPI/Include/BsD3D9RenderAPIFactory.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 	 *  @{
 	 */
 
-	const String SystemName = "BansheeD3D9RenderSystem";
+	const char* SystemName = "BansheeD3D9RenderSystem";
 
 	/**	Handles creation of the DX9 render system. */
 	class D3D9RenderAPIFactory : public RenderAPIFactory
@@ -23,7 +23,7 @@ namespace BansheeEngine
 		void create() override;
 
 		/** @copydoc RenderAPIFactory::name */
-		const String& name() const override { return SystemName; }
+		const char* name() const override { return SystemName; }
 
 	private:
 		/**	Registers the factory with the render system manager when constructed. */

+ 1 - 1
Source/BansheeD3D9RenderAPI/Source/BsD3D9Plugin.cpp

@@ -5,7 +5,7 @@
 
 namespace BansheeEngine
 {
-	extern "C" BS_D3D9_EXPORT const String& getPluginName()
+	extern "C" BS_D3D9_EXPORT const char* getPluginName()
 	{
 		return SystemName;
 	}

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

@@ -53,7 +53,7 @@ namespace BansheeEngine
 		friend class UndoRedo;
 
 		CmdInputFieldValueChange(const WString& description, InputFieldType* inputField, const ValueType& value)
-			:EditorCommand(description), mInputField(inputField), mOldValue(inputField->getValue()), mNewValue(value)
+			:EditorCommand(description), mOldValue(inputField->getValue()), mNewValue(value), mInputField(inputField)
 		{ }
 
 		ValueType mOldValue;

+ 0 - 1
Source/BansheeEditor/Include/BsGUIDockSlider.h

@@ -56,7 +56,6 @@ namespace BansheeEngine
 	private:
 		Vector2I mLastDragPosition;
 		bool mHorizontal;
-		bool mIsCursorSet;
 		bool mDragInProgress;
 
 		GUIDockSlider(bool horizontal, const String& styleName, const GUIDimensions& dimensions);

+ 6 - 0
Source/BansheeEditor/Source/BsBuildManager.cpp

@@ -86,6 +86,8 @@ namespace BansheeEngine
 			for (auto& lib : libs)
 				lib.setExtension(lib.getExtension() + ".dll");
 		}
+		default:
+			break;
 		}
 
 		return libs;
@@ -114,6 +116,8 @@ namespace BansheeEngine
 			{
 			case PlatformType::Windows:
 				return gEditorApplication().getProjectPath() + BUILD_FOLDER_NAME + L"Windows";
+			default:
+				break;
 			}
 
 			return gEditorApplication().getProjectPath() + BUILD_FOLDER_NAME;
@@ -146,6 +150,8 @@ namespace BansheeEngine
 
 			return output;
 		}
+		default:
+			break;
 		}
 
 		return Path::BLANK;

+ 2 - 2
Source/BansheeEditor/Source/BsCmdDeleteSO.cpp

@@ -8,8 +8,8 @@
 namespace BansheeEngine
 {
 	CmdDeleteSO::CmdDeleteSO(const WString& description, const HSceneObject& sceneObject)
-		:EditorCommand(description), mSceneObject(sceneObject), mSerializedObject(nullptr), 
-		mSerializedObjectParentId(0), mSerializedObjectSize(0)
+		: EditorCommand(description), mSceneObject(sceneObject), mSerializedObject(nullptr), mSerializedObjectSize(0)
+		, mSerializedObjectParentId(0)
 	{
 
 	}

+ 2 - 2
Source/BansheeEditor/Source/BsCmdRecordSO.cpp

@@ -8,8 +8,8 @@
 namespace BansheeEngine
 {
 	CmdRecordSO::CmdRecordSO(const WString& description, const HSceneObject& sceneObject, bool recordHierarchy)
-		:EditorCommand(description), mSceneObject(sceneObject), mSerializedObject(nullptr), mSerializedObjectSize(0), 
-		mRecordHierarchy(recordHierarchy)
+		: EditorCommand(description), mSceneObject(sceneObject), mRecordHierarchy(recordHierarchy)
+		, mSerializedObject(nullptr), mSerializedObjectSize(0)
 	{
 
 	}

+ 10 - 7
Source/BansheeEditor/Source/BsDockManager.cpp

@@ -34,16 +34,16 @@ namespace BansheeEngine
 	const UINT32 DockManager::DockContainer::MIN_CHILD_SIZE = 20;
 
 	DockManager::DockContainer::DockContainer(DockManager* manager)
-		:mIsLeaf(true), mWidgets(nullptr), mSplitPosition(0.5f),
-		mIsHorizontal(false), mParent(nullptr), mSlider(nullptr), mManager(manager)
+		: mIsLeaf(true), mParent(nullptr), mManager(manager), mWidgets(nullptr), mSlider(nullptr), mSplitPosition(0.5f)
+		, mIsHorizontal(false)
 	{
 		mChildren[0] = nullptr;
 		mChildren[1] = nullptr;
 	}
 
 	DockManager::DockContainer::DockContainer(DockManager* manager, DockContainer* parent)
-		:mIsLeaf(false), mWidgets(nullptr), mSplitPosition(0.5f),
-		mIsHorizontal(false), mParent(parent), mSlider(nullptr), mManager(manager)
+		: mIsLeaf(false), mParent(parent), mManager(manager), mWidgets(nullptr), mSlider(nullptr), mSplitPosition(0.5f)
+		, mIsHorizontal(false)  
 	{
 		mChildren[0] = nullptr;
 		mChildren[1] = nullptr;
@@ -445,8 +445,9 @@ namespace BansheeEngine
 	}
 
 	DockManager::DockManager(EditorWindowBase* parentWindow, const GUIDimensions& dimensions)
-		:GUIElementContainer(dimensions), mMouseOverContainer(nullptr), mHighlightedDropLoc(DockLocation::None),
-		mShowOverlay(false), mRootContainer(this), mParentWindow(parentWindow), mIsMaximized(false), mMaximizedContainer(nullptr)
+		: GUIElementContainer(dimensions), mParentWindow(parentWindow), mRootContainer(this), mIsMaximized(false)
+		, mMaximizedContainer(nullptr), mMouseOverContainer(nullptr), mHighlightedDropLoc(DockLocation::None)
+		, mShowOverlay(false)
 	{
 		mTopDropPolygon = bs_newN<Vector2>(4);
 		mBotDropPolygon = bs_newN<Vector2>(4);
@@ -525,6 +526,8 @@ namespace BansheeEngine
 			case DockLocation::Bottom:
 				container->addBottom(widgetToInsert);
 				break;
+			case DockLocation::None:
+				break;
 			}
 		}
 		else
@@ -1125,7 +1128,7 @@ namespace BansheeEngine
 	const Color DockOverlayRenderer::HIGHLIGHT_COLOR = Color(0.44f, 0.44f, 0.44f, 0.42f);
 
 	DockOverlayRenderer::DockOverlayRenderer()
-		:mShowOverlay(false), mHighlightedDropLoc(DockManager::DockLocation::None)
+		:mHighlightedDropLoc(DockManager::DockLocation::None), mShowOverlay(false)
 	{
 		
 	}

+ 2 - 2
Source/BansheeEditor/Source/BsDropDownWindow.cpp

@@ -16,8 +16,8 @@ namespace BansheeEngine
 {
 	DropDownWindow::DropDownWindow(const SPtr<RenderWindow>& parent, const SPtr<Camera>& camera,
 		const Vector2I& position, UINT32 width, UINT32 height)
-		:mRootPanel(nullptr), mPosition(position), mWidth(width), mHeight(height), 
-		mRenderWindow(parent), mFrontHitBox(nullptr), mBackHitBox(nullptr)
+		: mRenderWindow(parent), mFrontHitBox(nullptr), mBackHitBox(nullptr), mRootPanel(nullptr), mPosition(position)
+		, mWidth(width), mHeight(height)
 	{
 		mSceneObject = SceneObject::create("EditorWindow", SOF_Internal | SOF_Persistent | SOF_DontSave);
 

+ 2 - 2
Source/BansheeEditor/Source/BsEditorApplication.cpp

@@ -67,7 +67,7 @@ namespace BansheeEngine
 
 	EditorApplication::EditorApplication(EditorRenderAPI renderAPIPlugin)
 		:Application(createRenderWindowDesc(), toEngineRenderAPI(renderAPIPlugin), RendererPlugin::Default, getImporters()),
-		mActiveRAPIPlugin(toEngineRenderAPI(renderAPIPlugin)), mSBansheeEditorPlugin(nullptr), mIsProjectLoaded(false)
+		mActiveRAPIPlugin(toEngineRenderAPI(renderAPIPlugin)), mIsProjectLoaded(false), mSBansheeEditorPlugin(nullptr)
 	{
 
 	}
@@ -115,7 +115,7 @@ namespace BansheeEngine
 		BuildManager::startUp();
 		CodeEditorManager::startUp();
 
-		MainEditorWindow* mainWindow = MainEditorWindow::create(getPrimaryWindow());
+		MainEditorWindow::create(getPrimaryWindow());
 		ScriptManager::instance().initialize();
 	}
 

+ 3 - 3
Source/BansheeEditor/Source/BsEditorSettings.cpp

@@ -6,9 +6,9 @@
 namespace BansheeEngine
 {
 	EditorSettings::EditorSettings()
-		:mMoveSnapActive(false), mRotateSnapActive(false), mMoveSnap(0.1f), mRotationSnap(20.0f),
-		mGridSize(256), mGridAxisSpacing(1.0f), mHandleSize(0.10f), mActiveSceneTool(1 /* Move */),
-		mActiveCoordinateMode(0), mActivePivotMode(0), mFPSLimit(60), mMouseSensitivity(1.0f)
+		: mMoveSnapActive(false), mRotateSnapActive(false), mMoveSnap(0.1f), mRotationSnap(20.0f), mGridSize(256)
+		, mGridAxisSpacing(1.0f), mActiveSceneTool(1 /* Move */), mActiveCoordinateMode(0), mActivePivotMode(0)
+		, mHandleSize(0.10f), mFPSLimit(60), mMouseSensitivity(1.0f)
 	{ }
 	
 	RTTITypeBase* EditorSettings::getRTTIStatic()

+ 2 - 2
Source/BansheeEditor/Source/BsEditorWidget.cpp

@@ -15,8 +15,8 @@ namespace BansheeEngine
 {
 	EditorWidgetBase::EditorWidgetBase(const HString& displayName, const String& name, UINT32 defaultWidth,
 		UINT32 defaultHeight, EditorWidgetContainer& parentContainer)
-		:mDisplayName(displayName), mName(name), mParent(nullptr), mContent(nullptr), mX(0), mY(0), mWidth(0), 
-		mHeight(0), mHasFocus(false), mDefaultWidth(defaultWidth), mDefaultHeight(defaultHeight), mIsActive(true)
+		: mName(name), mDisplayName(displayName), mParent(nullptr), mX(0), mY(0), mWidth(0), mHeight(0)
+		, mDefaultWidth(defaultWidth), mDefaultHeight(defaultHeight), mContent(nullptr), mHasFocus(false), mIsActive(true)
 	{
 		parentContainer.add(*this);
 	}

+ 2 - 2
Source/BansheeEditor/Source/BsEditorWidgetContainer.cpp

@@ -18,8 +18,8 @@ namespace BansheeEngine
 	const UINT32 EditorWidgetContainer::TitleBarHeight = 16;
 
 	EditorWidgetContainer::EditorWidgetContainer(GUIWidget* parent, EditorWindowBase* parentEditorWindow)
-		:mParent(parent), mX(0), mY(0), mWidth(0), mHeight(0), mTitleBar(nullptr), mActiveWidget(-1),
-		mTitleBarPanel(nullptr), mParentWindow(parentEditorWindow)
+		: mParentWindow(parentEditorWindow), mTitleBar(nullptr), mTitleBarPanel(nullptr), mParent(parent), mX(0), mY(0)
+		, mWidth(0), mHeight(0), mActiveWidget(-1)
 	{
 		mTitleBarPanel = parent->getPanel()->addNewElement<GUIPanel>();
 

+ 2 - 2
Source/BansheeEditor/Source/BsGUIColorField.cpp

@@ -11,8 +11,8 @@ namespace BansheeEngine
 {
 	GUIColorField::GUIColorField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel),
-		mLabel(nullptr), mColor(nullptr), mLabelWidth(100)
+		: TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel)
+		, mLabelWidth(100), mLabel(nullptr), mColor(nullptr)
 	{
 		mColor = GUIColor::create(getSubStyleName(getColorInputStyleType()));
 		mColor->onClicked.connect(std::bind(&GUIColorField::clicked, this));

+ 1 - 2
Source/BansheeEditor/Source/BsGUIDockSlider.cpp

@@ -13,8 +13,7 @@ namespace BansheeEngine
 	}
 
 	GUIDockSlider::GUIDockSlider(bool horizontal, const String& styleName, const GUIDimensions& dimensions)
-		:GUIButtonBase(styleName, GUIContent(HString(L"")), dimensions),
-		mDragInProgress(false), mHorizontal(horizontal), mIsCursorSet(false)
+		: GUIButtonBase(styleName, GUIContent(HString(L"")), dimensions), mHorizontal(horizontal), mDragInProgress(false)
 	{
 
 	}

+ 3 - 3
Source/BansheeEditor/Source/BsGUIFloatField.cpp

@@ -19,9 +19,9 @@ namespace BansheeEngine
 
 	GUIFloatField::GUIFloatField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth, 
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mIsDragging(false),
-		mLastDragPos(0), mHasInputFocus(false), mValue(0.0f), mMinValue(std::numeric_limits<float>::lowest()),
-		mMaxValue(std::numeric_limits<float>::max())
+		: TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mValue(0.0f)
+		, mLastDragPos(0), mMinValue(std::numeric_limits<float>::lowest()), mMaxValue(std::numeric_limits<float>::max())
+		, mIsDragging(false), mHasInputFocus(false)
 	{
 		mInputBox = GUIInputBox::create(false, GUIOptions(GUIOption::flexibleWidth()), getSubStyleName(getInputStyleType()));
 		mInputBox->setFilter(&GUIFloatField::floatFilter);

+ 3 - 3
Source/BansheeEditor/Source/BsGUIIntField.cpp

@@ -20,9 +20,9 @@ namespace BansheeEngine
 
 	GUIIntField::GUIIntField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mIsDragging(false),
-		mLastDragPos(0), mIsDragCursorSet(false), mHasInputFocus(false), mMinValue(std::numeric_limits<INT32>::lowest()), 
-		mMaxValue(std::numeric_limits<INT32>::max())
+		: TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mValue(0)
+		, mLastDragPos(0), mMinValue(std::numeric_limits<INT32>::lowest())
+		, mMaxValue(std::numeric_limits<INT32>::max()), mIsDragging(false), mIsDragCursorSet(false), mHasInputFocus(false)
 	{
 		mInputBox = GUIInputBox::create(false, GUIOptions(GUIOption::flexibleWidth()), getSubStyleName(getInputStyleType()));
 		mInputBox->setFilter(&GUIIntField::intFilter);

+ 2 - 2
Source/BansheeEditor/Source/BsGUIMenuBar.cpp

@@ -60,8 +60,8 @@ namespace BansheeEngine
 	}
 
 	GUIMenuBar::GUIMenuBar(GUIWidget* parent, RenderWindow* parentWindow)
-		:mParentWidget(parent), mParentWindow(parentWindow), mMainPanel(nullptr), mMenuItemLayout(nullptr),
-		mBgTexture(nullptr), mLogoTexture(nullptr), mSubMenuOpen(false), mSubMenuButton(nullptr), mBgPanel(nullptr)
+		: mParentWindow(parentWindow), mParentWidget(parent), mMainPanel(nullptr), mBgPanel(nullptr)
+		, mMenuItemLayout(nullptr), mBgTexture(nullptr), mLogoTexture(nullptr), mSubMenuButton(nullptr), mSubMenuOpen(false)
 	{
 		mMainPanel = parent->getPanel()->addNewElement<GUIPanel>(std::numeric_limits<INT16>::min() + 15);
 		mMainPanel->setWidth(1);

+ 2 - 3
Source/BansheeEditor/Source/BsGUIResourceTreeView.cpp

@@ -383,7 +383,8 @@ namespace BansheeEngine
 
 	bool GUIResourceTreeView::acceptDragAndDrop() const
 	{
-		return mDropTargetDragActive || DragAndDropManager::instance().isDragInProgress() && DragAndDropManager::instance().getDragTypeId() == (UINT32)DragAndDropType::Resources;
+		return mDropTargetDragActive || (DragAndDropManager::instance().isDragInProgress() &&
+			DragAndDropManager::instance().getDragTypeId() == (UINT32)DragAndDropType::Resources);
 	}
 
 	void GUIResourceTreeView::dragAndDropStart(const Vector<TreeElement*>& elements)
@@ -492,8 +493,6 @@ namespace BansheeEngine
 	{
 		unselectAll();
 
-		ResourceTreeElement& root = mRootElement;
-
 		Stack<ResourceTreeElement*> todo;
 		todo.push(&mRootElement);
 

+ 0 - 6
Source/BansheeEditor/Source/BsGUISceneTreeView.cpp

@@ -401,8 +401,6 @@ namespace BansheeEngine
 		// for better performance.
 		updateTreeElementHierarchy();
 
-		SceneTreeElement& root = mRootElement;
-
 		Stack<SceneTreeElement*> todo;
 		todo.push(&mRootElement);
 
@@ -428,8 +426,6 @@ namespace BansheeEngine
 
 	void GUISceneTreeView::ping(const HSceneObject& object)
 	{
-		SceneTreeElement& root = mRootElement;
-
 		Stack<SceneTreeElement*> todo;
 		todo.push(&mRootElement);
 
@@ -454,8 +450,6 @@ namespace BansheeEngine
 
 	GUISceneTreeView::SceneTreeElement* GUISceneTreeView::findTreeElement(const HSceneObject& so)
 	{
-		SceneTreeElement& root = mRootElement;
-
 		Stack<SceneTreeElement*> todo;
 		todo.push(&mRootElement);
 

+ 6 - 6
Source/BansheeEditor/Source/BsGUIStatusBar.cpp

@@ -175,18 +175,18 @@ namespace BansheeEngine
 		}
 
 		WString message = toWString(entry.getMessage());
-		WString::size_type lfPos = message.find_first_of('\n');
-		WString::size_type crPos = message.find_first_of('\r');
-		WString::size_type newlinePos;
+		size_t lfPos = message.find_first_of('\n');
+		size_t crPos = message.find_first_of('\r');
+		size_t newlinePos;
 
-		if (lfPos >= 0)
+		if (lfPos != WString::npos)
 		{
-			if (crPos >= 0)
+			if (crPos != WString::npos)
 				newlinePos = std::min(lfPos, crPos);
 			else
 				newlinePos = lfPos;
 		}
-		else if (crPos >= 0)
+		else if (crPos != WString::npos)
 			newlinePos = crPos;
 		else
 			newlinePos = -1;

+ 4 - 8
Source/BansheeEditor/Source/BsGUITabbedTitleBar.cpp

@@ -21,11 +21,10 @@ namespace BansheeEngine
 
 	GUITabbedTitleBar::GUITabbedTitleBar(const String& backgroundStyle, const String& tabBtnStyle, 
 		const String& maxBtnStyle, const String& closeBtnStyle, const GUIDimensions& dimensions)
-		:GUIElementContainer(dimensions), mMaxBtn(nullptr), 
-		mCloseBtn(nullptr), mBackgroundImage(nullptr), mUniqueTabIdx(0), mActiveTabIdx(0),
-		mDragInProgress(false), mDraggedBtn(nullptr), mDragBtnOffset(0), mInitialDragOffset(0), mBackgroundStyle(backgroundStyle),
-		mTabBtnStyle(tabBtnStyle), mMaximizeBtnStyle(maxBtnStyle), mCloseBtnStyle(closeBtnStyle), mTempDraggedWidget(nullptr),
-		mTempDraggedTabIdx(0)
+		: GUIElementContainer(dimensions), mUniqueTabIdx(0), mActiveTabIdx(0), mBackgroundImage(nullptr), mMaxBtn(nullptr)
+		, mCloseBtn(nullptr), mTempDraggedWidget(nullptr), mTempDraggedTabIdx(0), mDragInProgress(false)
+		, mDraggedBtn(nullptr), mDragBtnOffset(0), mInitialDragOffset(0), mBackgroundStyle(backgroundStyle)
+		, mCloseBtnStyle(closeBtnStyle), mMaximizeBtnStyle(maxBtnStyle), mTabBtnStyle(tabBtnStyle)
 	{
 		if(mBackgroundStyle == StringUtil::BLANK)
 			mBackgroundStyle = "TabBarBackground";
@@ -208,9 +207,6 @@ namespace BansheeEngine
 			if(DragAndDropManager::instance().getDragTypeId() != (UINT32)DragAndDropType::EditorWidget)
 				return false;
 
-			EditorWidgetBase* draggedWidget = reinterpret_cast<EditorWidgetBase*>(DragAndDropManager::instance().getDragData());
-			const Vector2I& widgetRelPos = event.getPosition();
-
 			if(mTempDraggedWidget != nullptr)
 			{
 				UINT32 seqIdx = uniqueIdxToSeqIdx(mTempDraggedTabIdx);

+ 1 - 1
Source/BansheeEditor/Source/BsGUITextField.cpp

@@ -15,7 +15,7 @@ namespace BansheeEngine
 	GUITextField::GUITextField(const PrivatelyConstruct& dummy, bool multiline, const GUIContent& labelContent, 
 		UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel)
 		:GUIElementContainer(dimensions, style),
-		mInputBox(nullptr), mValue(L""), mHasInputFocus(false), mLayout(nullptr), mLabel(nullptr)
+		mInputBox(nullptr), mLayout(nullptr), mLabel(nullptr), mHasInputFocus(false), mValue(L"")
 	{
 		mLayout = GUILayoutX::create();
 		_registerChildElement(mLayout);

+ 12 - 11
Source/BansheeEditor/Source/BsGUITreeView.cpp

@@ -32,8 +32,8 @@ namespace BansheeEngine
 	const Color GUITreeView::DISABLED_COLOR = Color(1.0f, 1.0f, 1.0f, 0.6f);
 
 	GUITreeView::TreeElement::TreeElement()
-		:mParent(nullptr), mFoldoutBtn(nullptr), mElement(nullptr), mIsSelected(false),
-		mIsExpanded(false), mSortedIdx(0), mIsVisible(true), mIsHighlighted(false), mIsCut(false), mIsDisabled(false)
+		: mParent(nullptr), mFoldoutBtn(nullptr), mElement(nullptr), mSortedIdx(0), mIsExpanded(false), mIsSelected(false)
+		, mIsHighlighted(false), mIsVisible(true), mIsCut(false), mIsDisabled(false)
 	{ }
 
 	GUITreeView::TreeElement::~TreeElement()
@@ -83,11 +83,13 @@ namespace BansheeEngine
 	GUITreeView::GUITreeView(const String& backgroundStyle, const String& elementBtnStyle, 
 		const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& highlightBackgroundStyle, 
 		const String& editBoxStyle, const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& dimensions)
-		:GUIElementContainer(dimensions), mBackgroundStyle(backgroundStyle),
-		mElementBtnStyle(elementBtnStyle), mFoldoutBtnStyle(foldoutBtnStyle), mEditBoxStyle(editBoxStyle), mEditElement(nullptr), mIsElementSelected(false),
-		mNameEditBox(nullptr), mHighlightBackgroundStyle(highlightBackgroundStyle), mSelectionBackgroundStyle(selectionBackgroundStyle), mDragInProgress(false), 
-		mDragHighlightStyle(dragHighlightStyle), mDragSepHighlightStyle(dragSepHighlightStyle), mDragHighlight(nullptr), mDragSepHighlight(nullptr), mMouseOverDragElement(nullptr), 
-		mMouseOverDragElementTime(0.0f), mScrollState(ScrollState::None), mLastScrollTime(0.0f), mIsElementHighlighted(false)
+		: GUIElementContainer(dimensions), mBackgroundStyle(backgroundStyle), mElementBtnStyle(elementBtnStyle)
+		, mFoldoutBtnStyle(foldoutBtnStyle), mSelectionBackgroundStyle(selectionBackgroundStyle)
+		, mHighlightBackgroundStyle(highlightBackgroundStyle), mEditBoxStyle(editBoxStyle)
+		, mDragHighlightStyle(dragHighlightStyle), mDragSepHighlightStyle(dragSepHighlightStyle), mIsElementSelected(false)
+		, mIsElementHighlighted(false), mEditElement(nullptr), mNameEditBox(nullptr), mDragInProgress(false)
+		, mDragHighlight(nullptr), mDragSepHighlight(nullptr), mScrollState(ScrollState::None), mLastScrollTime(0.0f)
+		, mMouseOverDragElement(nullptr), mMouseOverDragElementTime(0.0f)
 	{
 		if(mBackgroundStyle == StringUtil::BLANK)
 			mBackgroundStyle = "TreeViewBackground";
@@ -192,6 +194,8 @@ namespace BansheeEngine
 						scrollArea->scrollDownPx(scrollAmount);
 					}
 					break;
+				case ScrollState::None:
+					break;
 				}
 			}
 		}
@@ -349,8 +353,6 @@ namespace BansheeEngine
 				if(dist > DRAG_MIN_DISTANCE && mEditElement == nullptr)
 				{
 					const GUITreeView::InteractableElement* element = findElementUnderCoord(mDragStartPosition);
-					TreeElement* treeElement = nullptr;
-
 					Vector<TreeElement*> draggedElements;
 
 					if(element != nullptr && element->isTreeElement())
@@ -1204,7 +1206,7 @@ namespace BansheeEngine
 
 	GUITreeView::TreeElement* GUITreeView::getBottomMostSelectedElement() const
 	{
-		auto& botMostElement = mVisibleElements.end();
+		auto botMostElement = mVisibleElements.end();
 
 		for(auto& selectedElement : mSelectedElements)
 		{
@@ -1317,7 +1319,6 @@ namespace BansheeEngine
 			INT32 top = myBounds.y;
 			INT32 bottom = myBounds.y + myBounds.height;
 
-			INT32 offset = 0;
 			if(elemVertTop < top)
 				scrollArea->scrollUpPx(top - elemVertTop);
 			else if(elemVertBottom > bottom)

+ 1 - 1
Source/BansheeEditor/Source/BsGUIWindowFrameWidget.cpp

@@ -15,7 +15,7 @@ namespace BansheeEngine
 	const UINT32 WindowFrameWidget::RESIZE_BORDER_WIDTH = 3;
 
 	WindowFrameWidget::WindowFrameWidget(const HSceneObject& parent, bool allowResize, const SPtr<Camera>& camera, RenderWindow* parentWindow, const HGUISkin& skin)
-		:CGUIWidget(parent, camera), mWindowFramePanel(nullptr), mParentWindow(parentWindow), mAllowResize(allowResize)
+		:CGUIWidget(parent, camera), mAllowResize(allowResize), mWindowFramePanel(nullptr), mParentWindow(parentWindow)
 	{
 		setSkin(skin);
 

+ 0 - 2
Source/BansheeEditor/Source/BsGizmoManager.cpp

@@ -1146,8 +1146,6 @@ namespace BansheeEngine
 	void GizmoManagerCore::renderIconGizmos(Rect2I screenArea, SPtr<MeshCoreBase> mesh, GizmoManager::IconRenderDataVecPtr renderData, bool usePickingMaterial)
 	{
 		RenderAPICore& rapi = RenderAPICore::instance();
-		const MeshProperties& meshProps = mesh->getProperties();
-
 		SPtr<VertexData> vertexData = mesh->getVertexData();
 
 		rapi.setVertexDeclaration(vertexData->vertexDeclaration);

+ 1 - 1
Source/BansheeEditor/Source/BsHandleDrawManager.cpp

@@ -23,7 +23,7 @@ namespace BansheeEngine
 	const UINT32 HandleDrawManager::ARC_QUALITY = 10;
 
 	HandleDrawManager::HandleDrawManager()
-		:mCore(nullptr), mLastFrameIdx((UINT64)-1)
+		:mLastFrameIdx((UINT64)-1), mCore(nullptr)
 	{
 		mTransform = Matrix4::IDENTITY;
 		mDrawHelper = bs_new<DrawHelper>();

+ 2 - 2
Source/BansheeEditor/Source/BsHandleManager.cpp

@@ -11,8 +11,8 @@
 namespace BansheeEngine
 {
 	HandleManager::HandleManager()
-		:mSliderManager(nullptr), mDrawManager(nullptr), mSettingsHash(0xFFFFFFFF),
-		mLastDrawFrameIdx((UINT64)-1), mInputStarted(false)
+		: mSliderManager(nullptr), mDrawManager(nullptr), mInputStarted(false), mSettingsHash(0xFFFFFFFF)
+		, mLastDrawFrameIdx((UINT64)-1)
 	{
 		mSliderManager = bs_new<HandleSliderManager>();
 		mDrawManager = bs_new<HandleDrawManager>();

+ 2 - 2
Source/BansheeEditor/Source/BsHandleSlider.cpp

@@ -8,8 +8,8 @@
 namespace BansheeEngine
 {
 	HandleSlider::HandleSlider(bool fixedScale, UINT64 layer)
-		:mFixedScale(fixedScale), mScale(Vector3::ONE), mTransformDirty(true),
-		mDistanceScale(1.0f), mLayer(layer), mEnabled(true)
+		: mFixedScale(fixedScale), mLayer(layer), mScale(Vector3::ONE), mDistanceScale(1.0f), mState(State::Inactive)
+		, mEnabled(true), mTransformDirty(true)
 	{
 
 	}

+ 5 - 8
Source/BansheeEditor/Source/BsHandleSliderDisc.cpp

@@ -8,16 +8,12 @@
 #include "BsQuaternion.h"
 #include "BsCCamera.h"
 
-// DEBUG ONLY
-#include "BsDebug.h"
-#include "BsGizmoManager.h"
-
 namespace BansheeEngine
 {
 	const float HandleSliderDisc::TORUS_RADIUS = 0.1f;
 
 	HandleSliderDisc::HandleSliderDisc(const Vector3& normal, float radius, bool fixedScale, UINT64 layer)
-		:HandleSlider(fixedScale, layer), mRadius(radius), mNormal(normal), mDelta(0.0f), mHasCutoffPlane(false)
+		:HandleSlider(fixedScale, layer), mNormal(normal), mRadius(radius), mHasCutoffPlane(false), mDelta(0.0f)
 	{
 		mCollider = Torus(normal, radius, TORUS_RADIUS);
 
@@ -93,7 +89,6 @@ namespace BansheeEngine
 
 		auto intersectResult = plane.intersects(inputRay);
 
-		float t = 0.0f;
 		if (intersectResult.first)
 			pointOnPlane = inputRay.getPoint(intersectResult.second);
 		else
@@ -109,7 +104,8 @@ namespace BansheeEngine
 		else
 			closestPoint2D = Vector2(mRadius, 0);
 
-		Radian angle = Math::atan2(-closestPoint2D.y, -closestPoint2D.x) + Math::PI;
+		Vector2 negClosestPoint2D = -closestPoint2D;
+		Radian angle = Math::atan2(negClosestPoint2D.y, negClosestPoint2D.x) + Radian(Math::PI);
 
 		float angleRad = angle.valueRadians();
 		float angleAmountRad = Math::clamp(angleAmount.valueRadians(), 0.0f, Math::PI * 2);
@@ -155,7 +151,8 @@ namespace BansheeEngine
 		Matrix4 worldToPlane = Matrix4::TRS(Vector3::ZERO, rot, Vector3::ONE);
 		point = worldToPlane.multiplyAffine(point);
 
-		return Radian(Math::atan2(-point.z, -point.x) + Math::PI);
+		Vector3 negPoint = -point;
+		return Radian(Math::atan2(negPoint.z, negPoint.x) + Radian(Math::PI));
 	}
 
 	void HandleSliderDisc::activate(const SPtr<Camera>& camera, const Vector2I& pointerPos)

+ 2 - 2
Source/BansheeEditor/Source/BsHandleSliderPlane.cpp

@@ -17,8 +17,8 @@ namespace BansheeEngine
 		mDirection2 = Vector3::normalize(dir2);
 
 		float halfLength = length * 0.5f;
-		std::array<Vector3, 2> axes = { mDirection1, mDirection2 };
-		std::array<float, 2> extents = { halfLength, halfLength };
+		std::array<Vector3, 2> axes = {{ mDirection1, mDirection2 }};
+		std::array<float, 2> extents = {{ halfLength, halfLength }};
 
 		Vector3 center = (dir1 * length + dir2 * length) * 0.5f;
 		mCollider = Rect3(center, axes, extents);

+ 4 - 3
Source/BansheeEditor/Source/BsMainEditorWindow.cpp

@@ -23,8 +23,8 @@ namespace BansheeEngine
 	}
 
 	MainEditorWindow::MainEditorWindow(const SPtr<RenderWindow>& renderWindow)
-		:EditorWindowBase(renderWindow), mDockManager(nullptr), 
-		mMenuBar(bs_new<GUIMenuBar>(mGUI->_getInternal(), mRenderWindow.get()))
+		: EditorWindowBase(renderWindow), mMenuBar(bs_new<GUIMenuBar>(mGUI->_getInternal(), mRenderWindow.get()))
+		, mDockManager(nullptr)
 	{
 		mDockManager = DockManager::create(this);
 		mGUI->getPanel()->addElement(mDockManager);
@@ -37,7 +37,8 @@ namespace BansheeEngine
 		mMenuBar->addMenuItem(L"File/Exit", nullptr, 10000);
 
 		SPtr<TestSuite> testSuite = TestSuite::create<EditorTestSuite>();
-		testSuite->run(ExceptionTestOutput());
+		ExceptionTestOutput testOutput;
+		testSuite->run(testOutput);
 
 		mRenderWindow->maximize(gCoreAccessor());
 	}

+ 2 - 2
Source/BansheeEditor/Source/BsModalWindow.cpp

@@ -16,8 +16,8 @@
 namespace BansheeEngine
 {
 	ModalWindow::ModalWindow(const HString& title, bool hasCloseButton)
-		:EditorWindowBase(true), mTitleBarPanel(nullptr), mTitleBarBgPanel(nullptr), 
-		mCloseButton(nullptr), mTitleBarBg(nullptr), mTitle(nullptr), mContents(nullptr)
+		: EditorWindowBase(true), mTitleBarPanel(nullptr), mTitleBarBgPanel(nullptr), mTitle(nullptr), mCloseButton(nullptr)
+		, mTitleBarBg(nullptr),mContents(nullptr)
 	{
 		EditorWindowManager::instance().registerWindow(this);
 

+ 3 - 3
Source/BansheeEditor/Source/BsProjectLibrary.cpp

@@ -28,11 +28,11 @@ namespace BansheeEngine
 	const WString ProjectLibrary::RESOURCE_MANIFEST_FILENAME = L"ResourceManifest.asset";
 
 	ProjectLibrary::LibraryEntry::LibraryEntry()
-		:parent(nullptr), type(LibraryEntryType::Directory)
+		:type(LibraryEntryType::Directory), parent(nullptr)
 	{ }
 
 	ProjectLibrary::LibraryEntry::LibraryEntry(const Path& path, const WString& name, DirectoryEntry* parent, LibraryEntryType type)
-		:path(path), parent(parent), type(type), elementName(name)
+		:type(type), path(path), elementName(name), parent(parent)
 	{ }
 
 	ProjectLibrary::FileEntry::FileEntry()
@@ -1082,7 +1082,7 @@ namespace BansheeEngine
 						DirectoryEntry* childSourceDirEntry = static_cast<DirectoryEntry*>(child);
 						DirectoryEntry* childDestDirEntry = addDirectoryInternal(destDir, childDestPath);
 
-						todo.push(std::make_tuple(childSourceDirEntry, childSourceDirEntry));
+						todo.push(std::make_tuple(childSourceDirEntry, childDestDirEntry));
 					}
 				}
 			}

+ 2 - 0
Source/BansheeEditor/Source/BsSceneGrid.cpp

@@ -110,6 +110,8 @@ namespace BansheeEngine
 			case GridMode::OrthoNegZ:
 				gridPlaneNormal = Vector3(0.0f, 0.0f, 1.0f);
 				break;
+			default:
+				break;
 			}
 
 			SceneGridCore* core = mCore.load(std::memory_order_relaxed);

+ 1 - 3
Source/BansheeEditor/Source/BsScenePicking.cpp

@@ -169,7 +169,7 @@ namespace BansheeEngine
 
 		assert(op.hasCompleted());
 
-		Vector<UINT32>& selectedObjects = op.getReturnValue<Vector<UINT32>>();
+		Vector<UINT32> selectedObjects = op.getReturnValue<Vector<UINT32>>();
 		Vector<HSceneObject> results;
 
 		for (auto& selectedObjectIdx : selectedObjects)
@@ -342,8 +342,6 @@ namespace BansheeEngine
 		outputTexture->readSubresource(0, *outputPixelData);
 
 		Map<UINT32, UINT32> selectionScores;
-		UINT32 numPixels = outputPixelData->getWidth() * outputPixelData->getHeight();
-
 		UINT32 maxWidth = std::min((UINT32)(position.x + area.x), outputPixelData->getWidth());
 		UINT32 maxHeight = std::min((UINT32)(position.y + area.y), outputPixelData->getHeight());
 

+ 2 - 2
Source/BansheeEditor/Source/BsUndoRedo.cpp

@@ -8,8 +8,8 @@ namespace BansheeEngine
 	const UINT32 UndoRedo::MAX_STACK_ELEMENTS = 1000;
 
 	UndoRedo::UndoRedo()
-		:mUndoStackPtr(0), mUndoNumElements(0), mRedoStackPtr(0), mRedoNumElements(0), mUndoStack(nullptr), 
-		mRedoStack(nullptr), mNextCommandId(0)
+		: mUndoStack(nullptr), mRedoStack(nullptr), mUndoStackPtr(0), mUndoNumElements(0), mRedoStackPtr(0)
+		, mRedoNumElements(0), mNextCommandId(0)
 	{
 		mUndoStack = bs_newN<EditorCommand*>(MAX_STACK_ELEMENTS);
 		mRedoStack = bs_newN<EditorCommand*>(MAX_STACK_ELEMENTS);

+ 1 - 1
Source/BansheeEditor/Source/Win32/BsVSCodeEditor.cpp

@@ -508,7 +508,7 @@ EndProject)";
     <None Include="{0}"/>)";
 
 	VSCodeEditor::VSCodeEditor(VisualStudioVersion version, const Path& execPath, const WString& CLSID)
-		:mCLSID(CLSID), mExecPath(execPath), mVersion(version)
+		:mVersion(version), mExecPath(execPath), mCLSID(CLSID)
 	{
 		
 	}

+ 3 - 4
Source/BansheeEngine/Include/BsGUIElementStyle.h

@@ -35,10 +35,9 @@ namespace BansheeEngine
 		};
 
 		GUIElementStyle()
-			:fontSize(8), width(0), height(0),
-			fixedWidth(false), fixedHeight(false), minWidth(0), maxWidth(0),
-			minHeight(0), maxHeight(0), textHorzAlign(THA_Left), textVertAlign(TVA_Top), 
-			wordWrap(false), imagePosition(GUIImagePosition::Left)
+			: fontSize(8), textHorzAlign(THA_Left), textVertAlign(TVA_Top), imagePosition(GUIImagePosition::Left)
+			, wordWrap(false), width(0), height(0), minWidth(0), maxWidth(0), minHeight(0), maxHeight(0)
+			, fixedWidth(false), fixedHeight(false)
 		{
 
 		}

+ 2 - 2
Source/BansheeEngine/Include/BsGUIInputSelection.h

@@ -23,7 +23,7 @@ namespace BansheeEngine
 		const Vector<ImageSprite*>& getSprites() const { return mSprites; }
 
 		/** Returns how much to offset the sprite with the specified index, relative to the parent widget. */
-		Vector2I GUIInputSelection::getSelectionSpriteOffset(UINT32 spriteIdx) const;
+		Vector2I getSelectionSpriteOffset(UINT32 spriteIdx) const;
 
 		/**
 		 * Returns clip rectangle relative to parent GUI element for the sprite with the specified index. 
@@ -32,7 +32,7 @@ namespace BansheeEngine
 		 * @param[in]	parentClipRect	Clip rectangle of the parent GUI element. Selection clip rectangle will 
 		 *								additionally be clipped by this area. Relative to parent element.
 		 */
-		Rect2I GUIInputSelection::getSelectionSpriteClipRect(UINT32 spriteIdx, const Rect2I& parentClipRect) const;
+		Rect2I getSelectionSpriteClipRect(UINT32 spriteIdx, const Rect2I& parentClipRect) const;
 
 		/**	Recreates the selection clip sprites. */
 		void updateSprite();

+ 1 - 1
Source/BansheeEngine/Include/BsGUILayoutData.h

@@ -18,7 +18,7 @@ namespace BansheeEngine
 	struct BS_EXPORT GUILayoutData
 	{
 		GUILayoutData()
-			:depthRangeMin(-1), depthRangeMax(-1), depth(0)
+			:depth(0), depthRangeMin(-1), depthRangeMax(-1)
 		{ 
 			setPanelDepth(0);
 		}

+ 2 - 0
Source/BansheeEngine/Include/BsGameSettings.h

@@ -18,6 +18,8 @@ namespace BansheeEngine
 	class BS_EXPORT GameSettings : public IReflectable
 	{
 	public:
+		GameSettings() { }
+
 		String mainSceneUUID; /**< Resource UUID of the default scene that is loaded when the application is started. */
 		bool fullscreen = true; /**< If true the application will be started in fullscreen using user's desktop resolution. */
 		bool useDesktopResolution = true; /**< If running in fullscreen should the user's desktop resolution be used instead of the specified resolution. */

+ 2 - 2
Source/BansheeEngine/Include/BsHEString.h

@@ -30,10 +30,10 @@ namespace BansheeEngine
 		 * updated.
 		 *
 		 * @param[in]	identifier		String you can use for later referencing the localized string.
-		 * @param[in]	default			Default string to assign to the specified identifier. Language to which it
+		 * @param[in]	defaultString	Default string to assign to the specified identifier. Language to which it
 		 *								will be assigned depends on the StringTable::DEFAULT_LANGUAGE value.
 		 */
-		HEString(const WString& identifier, const WString& default);
+		HEString(const WString& identifier, const WString& defaultString);
 
 		/**	Creates a new empty localized string in the engine string table. */
 		HEString();

+ 2 - 2
Source/BansheeEngine/Include/BsImageSprite.h

@@ -17,8 +17,8 @@ namespace BansheeEngine
 	struct IMAGE_SPRITE_DESC
 	{
 		IMAGE_SPRITE_DESC()
-			:width(0), height(0), anchor(SA_TopLeft), borderLeft(0), borderRight(0), 
-			borderTop(0), borderBottom(0), uvScale(1.0f, 1.0f), uvOffset(0.0f, 0.0f), transparent(true)
+			: width(0), height(0), anchor(SA_TopLeft), uvScale(1.0f, 1.0f), uvOffset(0.0f, 0.0f), transparent(true)
+			, borderLeft(0), borderRight(0), borderTop(0), borderBottom(0)
 		{ }
 
 		UINT32 width; /**< Width of the image in pixels. */

+ 1 - 1
Source/BansheeEngine/Include/BsRenderQueue.h

@@ -26,7 +26,7 @@ namespace BansheeEngine
 	struct BS_EXPORT RenderQueueElement
 	{
 		RenderQueueElement()
-			:passIdx(0), renderElem(nullptr), applyPass(true)
+			:renderElem(nullptr), passIdx(0), applyPass(true)
 		{ }
 
 		RenderableElement* renderElem;

+ 8 - 8
Source/BansheeEngine/Include/BsRenderable.h

@@ -22,6 +22,14 @@ namespace BansheeEngine
 		Everything = 0x02
 	};
 
+	template<bool Core> struct TMeshType {};
+	template<> struct TMeshType < false > { typedef HMesh Type; };
+	template<> struct TMeshType < true > { typedef SPtr<MeshCore> Type; };
+
+	template<bool Core> struct TMaterialType {};
+	template<> struct TMaterialType < false > { typedef HMaterial Type; };
+	template<> struct TMaterialType < true > { typedef SPtr<MaterialCore> Type; };
+
 	/**
 	 * Renderable represents any visible object in the scene. It has a mesh, bounds and a set of materials. Renderer will
 	 * render any Renderable objects visible by a camera.
@@ -29,14 +37,6 @@ namespace BansheeEngine
 	template<bool Core>
 	class BS_EXPORT TRenderable
 	{
-		template<bool Core> struct TMeshType {};
-		template<> struct TMeshType < false > { typedef HMesh Type; };
-		template<> struct TMeshType < true > { typedef SPtr<MeshCore> Type; };
-
-		template<bool Core> struct TMaterialType {};
-		template<> struct TMaterialType < false > { typedef HMaterial Type; };
-		template<> struct TMaterialType < true > { typedef SPtr<MaterialCore> Type; };
-
 		typedef typename TMeshType<Core>::Type MeshType;
 		typedef typename TMaterialType<Core>::Type MaterialType;
 

+ 0 - 14
Source/BansheeEngine/Include/BsSprite.h

@@ -179,19 +179,5 @@ struct std::hash<std::reference_wrapper<const BansheeEngine::SpriteMaterialInfo>
 	}
 };
 
-/** Provides equals operator for STL reference wrapper for SpriteMaterialInfo. */
-static bool operator==(const std::reference_wrapper<const BansheeEngine::SpriteMaterialInfo>& lhs, 
-	const std::reference_wrapper<const BansheeEngine::SpriteMaterialInfo>& rhs)
-{
-	return lhs.get() == rhs.get();
-}
-
-/** Provides not equals operator for STL reference wrapper for SpriteMaterialInfo. */
-static bool operator!=(const std::reference_wrapper<const BansheeEngine::SpriteMaterialInfo>& lhs,
-	const std::reference_wrapper<const BansheeEngine::SpriteMaterialInfo>& rhs)
-{
-	return !(lhs == rhs);
-}
-
 /** @} */
 /** @endcond */

+ 2 - 2
Source/BansheeEngine/Source/BsBuiltinResources.cpp

@@ -907,8 +907,8 @@ namespace BansheeEngine
 		ShapeMeshes3D::getNumElementsQuad(quadNumVertices, quadNumIndices);
 		SPtr<MeshData> quadMeshData = bs_shared_ptr_new<MeshData>(quadNumVertices, quadNumIndices, vertexDesc);
 
-		std::array<Vector3, 2> axes = { Vector3::UNIT_X, Vector3::UNIT_Y };
-		std::array<float, 2> sizes = { 1.0f, 1.0f };
+		std::array<Vector3, 2> axes = {{ Vector3::UNIT_X, Vector3::UNIT_Y }};
+		std::array<float, 2> sizes = {{ 1.0f, 1.0f }};
 		Rect3 rect(Vector3::ZERO, axes, sizes);
 		ShapeMeshes3D::solidQuad(rect, quadMeshData, 0, 0);
 		SPtr<Mesh> quadMesh = Mesh::_createPtr(quadMeshData);

+ 5 - 7
Source/BansheeEngine/Source/BsCamera.cpp

@@ -20,10 +20,10 @@ namespace BansheeEngine
 	const float CameraBase::INFINITE_FAR_PLANE_ADJUST = 0.00001f;
 
 	CameraBase::CameraBase()
-		:mProjType(PT_PERSPECTIVE), mHorzFOV(Degree(90.0f)), mFarDist(1000.0f),
-		mNearDist(0.05f), mAspect(1.33333333333333f), mOrthoHeight(5), mRecalcFrustum(true), mRecalcFrustumPlanes(true),
-		mCustomViewMatrix(false), mCustomProjMatrix(false), mFrustumExtentsManuallySet(false), mPriority(0), 
-		mLayers(0xFFFFFFFFFFFFFFFF), mRecalcView(true), mCameraFlags(0), mIsActive(true)
+		: mLayers(0xFFFFFFFFFFFFFFFF), mCameraFlags(0), mIsActive(true), mProjType(PT_PERSPECTIVE), mHorzFOV(Degree(90.0f))
+		, mFarDist(1000.0f), mNearDist(0.05f), mAspect(1.33333333333333f), mOrthoHeight(5), mPriority(0)
+		, mCustomViewMatrix(false), mCustomProjMatrix(false), mFrustumExtentsManuallySet(false), mRecalcFrustum(true)
+		, mRecalcFrustumPlanes(true), mRecalcView(true)
 	{
 		mViewMatrix = Matrix4::ZERO;
 		mProjMatrixRS = Matrix4::ZERO;
@@ -736,7 +736,7 @@ namespace BansheeEngine
 	}
 
 	Camera::Camera(SPtr<RenderTarget> target, float left, float top, float width, float height)
-		:mLastUpdateHash(0), mMain(false)
+		:mMain(false), mLastUpdateHash(0)
 	{
 		if (target != nullptr)
 			target->blockUntilCoreInitialized();
@@ -770,8 +770,6 @@ namespace BansheeEngine
 
 	SPtr<CoreObjectCore> Camera::createCore() const
 	{
-		Rect2 normArea = mViewport->getNormArea();
-
 		CameraCore* handler = new (bs_alloc<CameraCore>()) CameraCore(mViewport->getCore());
 		SPtr<CameraCore> handlerPtr = bs_shared_ptr<CameraCore>(handler);
 		handlerPtr->_setThisPtr(handlerPtr);

+ 3 - 1
Source/BansheeEngine/Source/BsCursor.cpp

@@ -9,7 +9,7 @@
 namespace BansheeEngine
 {
 	Cursor::Cursor()
-		:mActiveCursorId(-1), mNextUniqueId((UINT32)CursorType::Count)
+		:mNextUniqueId((UINT32)CursorType::Count), mActiveCursorId(-1)
 	{
 		for(UINT32 i = 0; i < (UINT32)CursorType::Count; i++)
 			restoreCursorIcon((CursorType)i);
@@ -162,6 +162,8 @@ namespace BansheeEngine
 		case CursorType::ArrowLeftRight:
 			mCustomIcons[id].pixelData = BuiltinResources::instance().getCursorMoveLeftRight(mCustomIcons[id].hotSpot);
 			return;
+		default:
+			break;
 		}
 
 		BS_EXCEPT(InvalidParametersException, "Invalid cursor type: " + toString((UINT32)type));

+ 2 - 1
Source/BansheeEngine/Source/BsDragAndDropManager.cpp

@@ -10,7 +10,8 @@ using namespace std::placeholders;
 namespace BansheeEngine
 {
 	DragAndDropManager::DragAndDropManager()
-		:mIsDragInProgress(false), mDragTypeId(0), mData(nullptr), mCaptureChanged(false), mCaptureActive(0), mNeedsValidDropTarget(false)
+		: mDragTypeId(0), mData(nullptr), mIsDragInProgress(false), mNeedsValidDropTarget(false), mCaptureChanged(false)
+		, mCaptureActive(0)
 	{
 		mMouseCaptureChangedConn = Platform::onMouseCaptureChanged.connect(std::bind(&DragAndDropManager::mouseCaptureChanged, this));
 		Input::instance().onPointerReleased.connect(std::bind(&DragAndDropManager::cursorReleased, this, _1));

+ 2 - 1
Source/BansheeEngine/Source/BsGUIButtonBase.cpp

@@ -12,7 +12,8 @@
 namespace BansheeEngine
 {
 	GUIButtonBase::GUIButtonBase(const String& styleName, const GUIContent& content, const GUIDimensions& dimensions)
-		:GUIElement(styleName, dimensions), mContent(content), mContentImageSprite(nullptr), mActiveState(GUIElementState::Normal)
+		: GUIElement(styleName, dimensions), mContentImageSprite(nullptr), mActiveState(GUIElementState::Normal)
+		, mContent(content)
 	{
 		mImageSprite = bs_new<ImageSprite>();
 		mTextSprite = bs_new<TextSprite>();

+ 5 - 5
Source/BansheeEngine/Source/BsGUIDropDownContent.cpp

@@ -21,9 +21,9 @@ namespace BansheeEngine
 
 	GUIDropDownContent::GUIDropDownContent(GUIDropDownMenu::DropDownSubMenu* parent, const GUIDropDownData& dropDownData, 
 		const String& style, const GUIDimensions& dimensions)
-		:GUIElementContainer(dimensions, style), mDropDownData(dropDownData), mKeyboardFocus(true), 
-		mStates(dropDownData.states), mSelectedIdx(UINT_MAX), mRangeStart(0), mRangeEnd(0), mParent(parent), 
-		mIsToggle(parent->getType() == GUIDropDownType::MultiListBox)
+		: GUIElementContainer(dimensions, style), mDropDownData(dropDownData), mStates(dropDownData.states)
+		, mSelectedIdx(UINT_MAX), mRangeStart(0), mRangeEnd(0), mParent(parent), mKeyboardFocus(true)
+		, mIsToggle(parent->getType() == GUIDropDownType::MultiListBox)
 	{
 
 	}
@@ -203,8 +203,6 @@ namespace BansheeEngine
 		if (!mKeyboardFocus)
 			return baseReturn;
 
-		UINT32 maxElemIdx = (UINT32)mDropDownData.entries.size();
-
 		switch (ev.getType())
 		{
 		case GUICommandEventType::MoveDown:
@@ -246,6 +244,8 @@ namespace BansheeEngine
 				mParent->elementActivated(mVisibleElements[mSelectedIdx].idx, mVisibleElements[mSelectedIdx].button->_getLayoutData().area);
 			}
 			return true;
+		default:
+			break;
 		}
 
 		return baseReturn;

+ 8 - 7
Source/BansheeEngine/Source/BsGUIDropDownMenu.cpp

@@ -56,7 +56,7 @@ namespace BansheeEngine
 	}
 
 	GUIDropDownMenu::GUIDropDownMenu(const HSceneObject& parent, const DROP_DOWN_BOX_DESC& desc, GUIDropDownType type)
-		:CGUIWidget(parent, desc.camera), mRootMenu(nullptr), mFrontHitBox(nullptr), mCaptureHitBox(nullptr), mBackHitBox(nullptr)
+		:CGUIWidget(parent, desc.camera), mRootMenu(nullptr), mFrontHitBox(nullptr), mBackHitBox(nullptr), mCaptureHitBox(nullptr)
 	{
 		String stylePrefix = "";
 		switch(type)
@@ -180,11 +180,13 @@ namespace BansheeEngine
 		mFrontHitBox->setBounds(bounds);
 	}
 
-	GUIDropDownMenu::DropDownSubMenu::DropDownSubMenu(GUIDropDownMenu* owner, DropDownSubMenu* parent, const DropDownAreaPlacement& placement,
-		const Rect2I& availableBounds, const GUIDropDownData& dropDownData, GUIDropDownType type, UINT32 depthOffset)
-		:mOwner(owner), mParent(parent), mPage(0), mBackgroundFrame(nullptr), mBackgroundPanel(nullptr), mContentPanel(nullptr),
-		mContentLayout(nullptr), x(0), y(0), width(0), height(0), mSidebarPanel(nullptr), mType(type), mSubMenu(nullptr), 
-		mData(dropDownData), mOpenedUpward(false), mDepthOffset(depthOffset), mContent(nullptr)
+	GUIDropDownMenu::DropDownSubMenu::DropDownSubMenu(GUIDropDownMenu* owner, DropDownSubMenu* parent, 
+		const DropDownAreaPlacement& placement, const Rect2I& availableBounds, const GUIDropDownData& dropDownData, 
+		GUIDropDownType type, UINT32 depthOffset)
+		: mOwner(owner), mType(type), mData(dropDownData), mPage(0), x(0), y(0), width(0), height(0)
+		, mDepthOffset(depthOffset), mOpenedUpward(false), mContent(nullptr), mBackgroundFrame(nullptr)
+		, mBackgroundPanel(nullptr), mContentPanel(nullptr), mContentLayout(nullptr), mSidebarPanel(nullptr)
+		, mParent(parent), mSubMenu(nullptr)
 	{
 		mAvailableBounds = availableBounds;
 
@@ -324,7 +326,6 @@ namespace BansheeEngine
 		const GUIElementStyle* sideBarStyle = mOwner->getSkin().getStyle(mOwner->mSideBackgroundStyle);
 		const GUIElementStyle* scrollUpStyle = mOwner->getSkin().getStyle(mOwner->mScrollUpStyle);
 		const GUIElementStyle* scrollDownStyle = mOwner->getSkin().getStyle(mOwner->mScrollDownStyle);
-		const GUIElementStyle* handleStyle = mOwner->getSkin().getStyle(mOwner->mHandleStyle);
 
 		Vector<PageInfo> pageInfos = getPageInfos();
 

+ 2 - 2
Source/BansheeEngine/Source/BsGUIElement.cpp

@@ -10,8 +10,8 @@ namespace BansheeEngine
 	const Color GUIElement::DISABLED_COLOR = Color(0.5f, 0.5f, 0.5f, 1.0f);
 
 	GUIElement::GUIElement(const String& styleName, const GUIDimensions& dimensions)
-		:GUIElementBase(dimensions), mStyle(&GUISkin::DefaultStyle),
-		mIsDestroyed(false), mStyleName(styleName), mBlockPointerEvents(true)
+		:GUIElementBase(dimensions), mIsDestroyed(false), mBlockPointerEvents(true), mStyle(&GUISkin::DefaultStyle)
+		, mStyleName(styleName)
 	{
 		// Style is set to default here, and the proper one is assigned once GUI element
 		// is assigned to a parent (that's when the active GUI skin becomes known)

+ 4 - 4
Source/BansheeEngine/Source/BsGUIElementBase.cpp

@@ -11,15 +11,15 @@
 namespace BansheeEngine
 {
 	GUIElementBase::GUIElementBase()
-		:mParentElement(nullptr), mParentWidget(nullptr), mAnchorParent(nullptr), mUpdateParent(nullptr), 
-		mFlags(GUIElem_Dirty)
+		: mParentWidget(nullptr), mAnchorParent(nullptr), mUpdateParent(nullptr), mParentElement(nullptr)
+		, mFlags(GUIElem_Dirty)
 	{
 
 	}
 
 	GUIElementBase::GUIElementBase(const GUIDimensions& dimensions)
-		:mParentElement(nullptr), mParentWidget(nullptr), mDimensions(dimensions), mAnchorParent(nullptr), 
-		mUpdateParent(nullptr), mFlags(GUIElem_Dirty)
+		: mParentWidget(nullptr), mAnchorParent(nullptr), mUpdateParent(nullptr), mParentElement(nullptr)
+		, mFlags(GUIElem_Dirty), mDimensions(dimensions)
 	{
 
 	}

+ 2 - 13
Source/BansheeEngine/Source/BsGUIInputBox.cpp

@@ -29,9 +29,8 @@ namespace BansheeEngine
 	}
 
 	GUIInputBox::GUIInputBox(const String& styleName, const GUIDimensions& dimensions, bool multiline)
-		:GUIElement(styleName, dimensions), mDragInProgress(false),
-		mCaretShown(false), mSelectionShown(false), mIsMultiline(multiline), mHasFocus(false), mIsMouseOver(false),
-		mState(State::Normal)
+		: GUIElement(styleName, dimensions), mIsMultiline(multiline), mHasFocus(false), mIsMouseOver(false)
+		, mState(State::Normal), mCaretShown(false), mSelectionShown(false), mDragInProgress(false)
 	{
 		mImageSprite = bs_new<ImageSprite>();
 		mTextSprite = bs_new<TextSprite>();
@@ -79,7 +78,6 @@ namespace BansheeEngine
 			if (mHasFocus)
 			{
 				TEXT_SPRITE_DESC textDesc = getTextDesc();
-				Vector2I offset = getTextOffset();
 
 				gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 				gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
@@ -949,7 +947,6 @@ namespace BansheeEngine
 		mCaretShown = true;
 
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Vector2I offset = getTextOffset();
 		gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 	}
 
@@ -961,7 +958,6 @@ namespace BansheeEngine
 	void GUIInputBox::showSelection(UINT32 anchorCaretPos)
 	{
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Vector2I offset = getTextOffset();
 		gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
 
 		gGUIManager().getInputSelectionTool()->showSelection(anchorCaretPos);
@@ -1022,7 +1018,6 @@ namespace BansheeEngine
 
 	void GUIInputBox::clampScrollToBounds(Rect2I unclippedTextBounds)
 	{
-		Vector2I origSize = mDimensions.calculateSizeRange(_getOptimalSize()).optimal;
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
 
 		Vector2I newTextOffset;
@@ -1045,7 +1040,6 @@ namespace BansheeEngine
 		mText.insert(mText.begin() + charIdx, string.begin(), string.end());
 
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Vector2I offset = getTextOffset();
 
 		gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 		gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
@@ -1056,7 +1050,6 @@ namespace BansheeEngine
 		mText.insert(mText.begin() + charIdx, charCode);
 
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Vector2I offset = getTextOffset();
 
 		gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 		gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
@@ -1067,7 +1060,6 @@ namespace BansheeEngine
 		mText.erase(charIdx, 1);
 
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Vector2I offset = getTextOffset();
 
 		gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 		gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
@@ -1095,7 +1087,6 @@ namespace BansheeEngine
 			mText.erase(mText.begin() + selStart, mText.begin() + selEnd);
 
 			TEXT_SPRITE_DESC textDesc = getTextDesc();
-			Vector2I offset = getTextOffset();
 			gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 			gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
 
@@ -1124,8 +1115,6 @@ namespace BansheeEngine
 		UINT32 selEnd = gGUIManager().getInputSelectionTool()->getSelectionEnd();
 
 		return mText.substr(selStart, selEnd - selStart);
-
-		mText.erase(mText.begin() + selStart, mText.begin() + gGUIManager().getInputSelectionTool()->getSelectionEnd());
 	}
 
 	Vector2I GUIInputBox::getTextOffset() const

+ 2 - 4
Source/BansheeEngine/Source/BsGUIInputTool.cpp

@@ -9,7 +9,7 @@
 namespace BansheeEngine
 {
 	GUIInputTool::GUIInputTool()
-		:mQuads(nullptr), mNumQuads(0), mElement(nullptr)
+		:mElement(nullptr), mQuads(nullptr), mNumQuads(0)
 	{ }
 
 	GUIInputTool::~GUIInputTool()
@@ -42,8 +42,6 @@ namespace BansheeEngine
 			TextSprite::genTextQuads(textData, mTextDesc.width, mTextDesc.height, mTextDesc.horzAlign, mTextDesc.vertAlign, mTextDesc.anchor,
 				mQuads, nullptr, nullptr, mNumQuads);
 
-			UINT32 numVerts = mNumQuads * 4;
-
 			// Store cached line data
 			UINT32 curCharIdx = 0;
 			UINT32 curLineIdx = 0;
@@ -107,7 +105,7 @@ namespace BansheeEngine
 		for(UINT32 i = 0; i < lineIdx; i++)
 			numNewlineChars += (getLineDesc(i).hasNewlineChar() ? 1 : 0);
 
-		UINT32 quadIdx = charIdx - numNewlineChars;
+		INT32 quadIdx = (INT32)(charIdx - numNewlineChars);
 		if(quadIdx >= 0 && quadIdx < mNumQuads)
 		{
 			UINT32 vertIdx = quadIdx * 4;

+ 2 - 2
Source/BansheeEngine/Source/BsGUILayout.cpp

@@ -35,7 +35,7 @@ namespace BansheeEngine
 
 	void GUILayout::insertElement(UINT32 idx, GUIElementBase* element)
 	{
-		if(idx < 0 || idx > (UINT32)mChildren.size())
+		if(idx > (UINT32)mChildren.size())
 			BS_EXCEPT(InvalidParametersException, "Index out of range: " + toString(idx) + ". Valid range: 0 .. " + toString((UINT32)mChildren.size()));
 
 		if (element->_isDestroyed())
@@ -59,7 +59,7 @@ namespace BansheeEngine
 
 	void GUILayout::removeElementAt(UINT32 idx)
 	{
-		if(idx < 0 || idx >= (UINT32)mChildren.size())
+		if(idx >= (UINT32)mChildren.size())
 			BS_EXCEPT(InvalidParametersException, "Index out of range: " + toString(idx) + ". Valid range: 0 .. " + toString((UINT32)mChildren.size()));
 
 		GUIElementBase* child = mChildren[idx];

+ 6 - 3
Source/BansheeEngine/Source/BsGUILayoutX.cpp

@@ -196,7 +196,8 @@ namespace BansheeEngine
 		// Weight is to ensure all elements are scaled fairly, so elements that are large will get effected more than smaller elements.
 		childIdx = 0;
 		float invOptimalSize = 1.0f / totalNonClampedSize;
-		for (auto& child : mChildren)
+		UINT32 childCount = (UINT32)mChildren.size();
+		for (UINT32 i = 0; i < childCount; i++)
 		{
 			if (processedElements[childIdx])
 			{
@@ -267,6 +268,8 @@ namespace BansheeEngine
 						remainingSize = (UINT32)std::max(0, (INT32)remainingSize - (INT32)extraWidth);
 					}
 						break;
+					case GUIElementBase::Type::FixedSpace:
+						break;
 					}
 
 					childIdx++;
@@ -328,6 +331,8 @@ namespace BansheeEngine
 						remainingSize = (UINT32)std::max(0, (INT32)remainingSize - (INT32)extraWidth);
 					}
 						break;
+					case GUIElementBase::Type::FixedSpace:
+						break;
 					}
 
 					childIdx++;
@@ -371,8 +376,6 @@ namespace BansheeEngine
 			}
 			else if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
-				GUILayout* layout = static_cast<GUILayout*>(child);
-
 				elementAreas[childIdx].x = layoutArea.x + xOffset;
 				elementAreas[childIdx].y = layoutArea.y;
 			}

+ 6 - 1
Source/BansheeEngine/Source/BsGUILayoutY.cpp

@@ -196,7 +196,8 @@ namespace BansheeEngine
 		// Weight is to ensure all elements are scaled fairly, so elements that are large will get effected more than smaller elements.
 		childIdx = 0;
 		float invOptimalSize = 1.0f / totalNonClampedSize;
-		for (auto& child : mChildren)
+		UINT32 childCount = (UINT32)mChildren.size();
+		for (UINT32 i = 0; i < childCount; i++)
 		{
 			if (processedElements[childIdx])
 			{
@@ -267,6 +268,8 @@ namespace BansheeEngine
 						remainingSize = (UINT32)std::max(0, (INT32)remainingSize - (INT32)extraHeight);
 					}
 						break;
+					case GUIElementBase::Type::FixedSpace:
+						break;
 					}
 
 					childIdx++;
@@ -328,6 +331,8 @@ namespace BansheeEngine
 						remainingSize = (UINT32)std::max(0, (INT32)remainingSize - (INT32)extraHeight);
 					}
 						break;
+					case GUIElementBase::Type::FixedSpace:
+						break;
 					}
 
 					childIdx++;

+ 4 - 4
Source/BansheeEngine/Source/BsGUIManager.cpp

@@ -71,10 +71,10 @@ namespace BansheeEngine
 	const UINT32 GUIManager::MESH_HEAP_INITIAL_NUM_INDICES = 49152;
 
 	GUIManager::GUIManager()
-		:mSeparateMeshesByWidget(true), mActiveMouseButton(GUIMouseButton::Left),
-		mCaretBlinkInterval(0.5f), mCaretLastBlinkTime(0.0f), mCaretColor(1.0f, 0.6588f, 0.0f), mIsCaretOn(false),
-		mTextSelectionColor(0.0f, 114/255.0f, 188/255.0f), mInputCaret(nullptr), mInputSelection(nullptr), 
-		mDragState(DragState::NoDrag), mActiveCursor(CursorType::Arrow), mCoreDirty(false), mShowTooltip(false), mTooltipElementHoverStart(0.0f)
+		: mCoreDirty(false), mActiveMouseButton(GUIMouseButton::Left), mShowTooltip(false), mTooltipElementHoverStart(0.0f)
+		, mInputCaret(nullptr), mInputSelection(nullptr), mSeparateMeshesByWidget(true), mDragState(DragState::NoDrag)
+		, mCaretColor(1.0f, 0.6588f, 0.0f), mCaretBlinkInterval(0.5f), mCaretLastBlinkTime(0.0f), mIsCaretOn(false)
+		, mActiveCursor(CursorType::Arrow), mTextSelectionColor(0.0f, 114/255.0f, 188/255.0f)
 	{
 		mOnPointerMovedConn = gInput().onPointerMoved.connect(std::bind(&GUIManager::onPointerMoved, this, _1));
 		mOnPointerPressedConn = gInput().onPointerPressed.connect(std::bind(&GUIManager::onPointerPressed, this, _1));

+ 2 - 2
Source/BansheeEngine/Source/BsGUIMenu.cpp

@@ -12,14 +12,14 @@ namespace BansheeEngine
 
 	GUIMenuItem::GUIMenuItem(GUIMenuItem* parent, const WString& name, std::function<void()> callback, 
 		INT32 priority, UINT32 seqIdx, const ShortcutKey& key)
-		:mParent(parent), mName(name), mCallback(callback), mIsSeparator(false), mPriority(priority), 
+		:mParent(parent), mIsSeparator(false), mName(name), mCallback(callback), mPriority(priority),
 		mShortcut(key), mSeqIdx(seqIdx)
 	{
 
 	}
 
 	GUIMenuItem::GUIMenuItem(GUIMenuItem* parent, INT32 priority, UINT32 seqIdx)
-		: mParent(parent), mCallback(nullptr), mIsSeparator(true), mPriority(priority), mSeqIdx(seqIdx)
+		: mParent(parent), mIsSeparator(true), mCallback(nullptr), mPriority(priority), mSeqIdx(seqIdx)
 	{
 
 	}

+ 3 - 4
Source/BansheeEngine/Source/BsGUIMouseEvent.cpp

@@ -5,15 +5,14 @@
 namespace BansheeEngine
 {
 	GUIMouseEvent::GUIMouseEvent()
-		:mType(GUIMouseEventType::MouseMove), mButton(GUIMouseButton::Left), 
-		mShift(false), mCtrl(false), mAlt(false), mWheelScrollAmount(0.0f)
+		: mWheelScrollAmount(0.0f), mType(GUIMouseEventType::MouseMove), mButton(GUIMouseButton::Left)
+		, mShift(false), mCtrl(false), mAlt(false)
 	{
 
 	}
 
 	GUIMouseEvent::GUIMouseEvent(bool buttonStates[(int)GUIMouseButton::Count], bool shift, bool ctrl, bool alt)
-		:mType(GUIMouseEventType::MouseMove), mButton(GUIMouseButton::Left),
-		mShift(shift), mCtrl(ctrl), mAlt(alt)
+		:mType(GUIMouseEventType::MouseMove), mButton(GUIMouseButton::Left), mShift(shift), mCtrl(ctrl), mAlt(alt)
 	{
 		memcpy(mButtonStates, buttonStates, sizeof(mButtonStates));
 	}

+ 5 - 5
Source/BansheeEngine/Source/BsGUIScrollArea.cpp

@@ -19,9 +19,9 @@ namespace BansheeEngine
 
 	GUIScrollArea::GUIScrollArea(ScrollBarType vertBarType, ScrollBarType horzBarType, 
 		const String& scrollBarStyle, const String& scrollAreaStyle, const GUIDimensions& dimensions)
-		:GUIElementContainer(dimensions), mVertScroll(nullptr), mHorzScroll(nullptr), mVertOffset(0), mHorzOffset(0),
-		mVertBarType(vertBarType), mHorzBarType(horzBarType), mScrollBarStyle(scrollBarStyle), mRecalculateVertOffset(false),
-		mRecalculateHorzOffset(false)
+		: GUIElementContainer(dimensions), mVertBarType(vertBarType), mHorzBarType(horzBarType)
+		, mScrollBarStyle(scrollBarStyle), mVertScroll(nullptr), mHorzScroll(nullptr), mVertOffset(0), mHorzOffset(0)
+		, mRecalculateVertOffset(false), mRecalculateHorzOffset(false)
 	{
 		mContentLayout = GUILayoutY::create();
 		_registerChildElement(mContentLayout);
@@ -147,7 +147,7 @@ namespace BansheeEngine
 		visibleSize = Vector2I(layoutArea.width, layoutArea.height);
 
 		bool addHorzScrollbar = (mHorzBarType == ScrollBarType::ShowIfDoesntFit && contentSize.x > visibleSize.x) ||
-			mHorzBarType == ScrollBarType::AlwaysShow && mHorzBarType != ScrollBarType::NeverShow;
+			mHorzBarType == ScrollBarType::AlwaysShow;
 
 		bool hasHorzScrollbar = false;
 		bool hasVertScrollbar = false;
@@ -167,7 +167,7 @@ namespace BansheeEngine
 		}
 
 		bool addVertScrollbar = (mVertBarType == ScrollBarType::ShowIfDoesntFit && contentSize.y > visibleSize.y) ||
-			mVertBarType == ScrollBarType::AlwaysShow && mVertBarType != ScrollBarType::NeverShow;
+			mVertBarType == ScrollBarType::AlwaysShow;
 
 		if (addVertScrollbar)
 		{

+ 3 - 2
Source/BansheeEngine/Source/BsGUISliderHandle.cpp

@@ -16,8 +16,9 @@ namespace BansheeEngine
 	}
 
 	GUISliderHandle::GUISliderHandle(bool horizontal, bool jumpOnClick, const String& styleName, const GUIDimensions& dimensions)
-		:GUIElement(styleName, dimensions), mHorizontal(horizontal), mHandleSize(0), mMouseOverHandle(false), mPctHandlePos(0.0f), mDragStartPos(0),
-		mHandleDragged(false), mState(State::Normal), mJumpOnClick(jumpOnClick), mStep(0.0f)
+		: GUIElement(styleName, dimensions), mHandleSize(0), mHorizontal(horizontal), mJumpOnClick(jumpOnClick)
+		, mPctHandlePos(0.0f), mStep(0.0f), mDragStartPos(0), mMouseOverHandle(false), mHandleDragged(false)
+		, mState(State::Normal)
 	{
 		mImageSprite = bs_new<ImageSprite>();
 	}

+ 1 - 2
Source/BansheeEngine/Source/BsGUITexture.cpp

@@ -16,8 +16,7 @@ namespace BansheeEngine
 
 	GUITexture::GUITexture(const String& styleName, const HSpriteTexture& texture, 
 		GUIImageScaleMode scale, bool transparent, const GUIDimensions& dimensions)
-		:GUIElement(styleName, dimensions), mScaleMode(scale), mUsingStyleTexture(false),
-		mTransparent(transparent)
+		:GUIElement(styleName, dimensions), mScaleMode(scale), mTransparent(transparent), mUsingStyleTexture(false)
 	{
 		mImageSprite = bs_new<ImageSprite>();
 

+ 1 - 1
Source/BansheeEngine/Source/BsGUIToggle.cpp

@@ -14,7 +14,7 @@ namespace BansheeEngine
 	}
 
 	GUIToggle::GUIToggle(const String& styleName, const GUIContent& content, SPtr<GUIToggleGroup> toggleGroup, const GUIDimensions& dimensions)
-		:GUIButtonBase(styleName, content, dimensions), mIsToggled(false), mToggleGroup(nullptr)
+		:GUIButtonBase(styleName, content, dimensions), mToggleGroup(nullptr), mIsToggled(false)
 	{
 		if(toggleGroup != nullptr)
 			toggleGroup->_add(this);

+ 1 - 1
Source/BansheeEngine/Source/BsGUITooltip.cpp

@@ -76,7 +76,7 @@ namespace BansheeEngine
 		backgroundLayout->addElement(backgroundFrame);
 
 		GUILayout* contentLayout = contentPanel->addNewElement<GUILayoutY>();
-		GUILabel* textLabel = contentLayout->addNewElement<GUILabel>(HString(text), 
+		contentLayout->addNewElement<GUILabel>(HString(text), 
 			GUIOptions(GUIOption::fixedWidth(TOOLTIP_WIDTH), GUIOption::flexibleHeight()), 
 			BuiltinResources::MultiLineLabelStyle);
 

+ 4 - 13
Source/BansheeEngine/Source/BsGUIWidget.cpp

@@ -15,15 +15,15 @@
 namespace BansheeEngine
 {
 	GUIWidget::GUIWidget(const SPtr<Camera>& camera)
-		:mWidgetIsDirty(false), mCamera(camera), mDepth(0), mPanel(nullptr), mIsActive(true), 
-		mTransform(Matrix4::IDENTITY), mCachedRTId(0)
+		: mCamera(camera), mPanel(nullptr), mDepth(0), mIsActive(true), mTransform(Matrix4::IDENTITY), mCachedRTId(0)
+		, mWidgetIsDirty(false)
 	{
 		construct(camera);
 	}
 
 	GUIWidget::GUIWidget(const HCamera& camera)
-		:mWidgetIsDirty(false), mCamera(camera->_getCamera()), mDepth(0), mPanel(nullptr), 
-		mIsActive(true), mTransform(Matrix4::IDENTITY), mCachedRTId(0)
+		: mCamera(camera->_getCamera()), mPanel(nullptr), mDepth(0), mIsActive(true), mTransform(Matrix4::IDENTITY)
+		, mCachedRTId(0), mWidgetIsDirty(false)
 	{
 		construct(mCamera);
 	}
@@ -111,25 +111,16 @@ namespace BansheeEngine
 
 		if(!mWidgetIsDirty)
 		{
-			Vector3 posDiff = mPosition - position;
 			if(!Math::approxEquals(mPosition, position, diffEpsilon))
-			{
 				mWidgetIsDirty = true;
-			}
 			else
 			{
-				Quaternion rotDiff = mRotation - rotation;
 				if(!Math::approxEquals(mRotation, rotation, diffEpsilon))
-				{
 					mWidgetIsDirty = true;
-				}
 				else
 				{
-					Vector3 scaleDiff = mScale - scale;
 					if(Math::approxEquals(mScale, scale))
-					{
 						mWidgetIsDirty = true;
-					}
 				}
 			}
 		}

+ 0 - 1
Source/BansheeEngine/Source/BsImageSprite.cpp

@@ -18,7 +18,6 @@ namespace BansheeEngine
 
 	void ImageSprite::update(const IMAGE_SPRITE_DESC& desc, UINT64 groupId)
 	{
-		const FontBitmap* fontData = nullptr;
 		if(desc.texture == nullptr || desc.texture->getTexture() == nullptr)
 		{
 			clearMesh();

+ 2 - 2
Source/BansheeEngine/Source/BsInputConfiguration.cpp

@@ -19,11 +19,11 @@ namespace BansheeEngine
 	{ }
 
 	VIRTUAL_AXIS_DESC::VIRTUAL_AXIS_DESC()
-		: type((UINT32)InputAxis::MouseX), deadZone(0.0001f), sensitivity(1.0f), invert(false)
+		:deadZone(0.0001f), sensitivity(1.0f), invert(false), type((UINT32)InputAxis::MouseX)
 	{ }
 
 	VIRTUAL_AXIS_DESC::VIRTUAL_AXIS_DESC(UINT32 type, float deadZone, float sensitivity, bool invert)
-		:type(type), deadZone(deadZone), sensitivity(sensitivity), invert(invert)
+		:deadZone(deadZone), sensitivity(sensitivity), invert(invert), type(type)
 	{ }
 
 	VirtualButton::VirtualButton()

+ 6 - 7
Source/BansheeEngine/Source/BsLight.cpp

@@ -11,17 +11,16 @@
 namespace BansheeEngine
 {
 	LightBase::LightBase()
-		:mType(LightType::Point), mCastsShadows(false), mRange(10.0f),
-		mIntensity(5.0f), mSpotAngle(45), mSpotFalloffAngle(35.0f), mColor(Color::White), 
-		mIsActive(true), mPhysCorrectAtten(true)
+		: mType(LightType::Point), mCastsShadows(false), mColor(Color::White), mRange(10.0f), mIntensity(5.0f)
+		, mSpotAngle(45), mSpotFalloffAngle(35.0f), mIsActive(true), mPhysCorrectAtten(true)
 	{
 		updatePhysicallyCorrectRange();
 	}
 
 	LightBase::LightBase(LightType type, Color color,
 		float intensity, float range, bool castsShadows, Degree spotAngle, Degree spotFalloffAngle)
-		:mType(type), mCastsShadows(castsShadows), mRange(range), mSpotFalloffAngle(spotFalloffAngle),
-		mIntensity(intensity), mSpotAngle(spotAngle), mColor(color), mIsActive(true), mPhysCorrectAtten(true)
+		: mType(type), mCastsShadows(castsShadows), mColor(color), mRange(range), mIntensity(intensity)
+		, mSpotAngle(spotAngle), mSpotFalloffAngle(spotFalloffAngle), mIsActive(true), mPhysCorrectAtten(true)
 	{
 		updatePhysicallyCorrectRange();
 	}
@@ -69,9 +68,9 @@ namespace BansheeEngine
 
 			return mIntensity / (Math::TWO_PI * (1.0f - (cosFalloffAngle + cosTotalAngle) * 0.5f));
 		}
+		case LightType::Directional:
+			return mIntensity;
 		}
-
-		return mIntensity;
 	}
 
 	void LightBase::updatePhysicallyCorrectRange()

+ 4 - 4
Source/BansheeEngine/Source/BsProfilerOverlay.cpp

@@ -33,7 +33,7 @@ namespace BansheeEngine
 		Vector<ProfilerOverlayInternal::BasicRow>& rows;
 
 		BasicRowFiller(Vector<ProfilerOverlayInternal::BasicRow>& _rows, GUILayout& _labelLayout, GUILayout& _contentLayout, GUIWidget& _widget)
-			:rows(_rows), curIdx(0), labelLayout(_labelLayout), contentLayout(_contentLayout), widget(_widget)
+			:curIdx(0), labelLayout(_labelLayout), contentLayout(_contentLayout), widget(_widget), rows(_rows)
 		{ }
 
 		~BasicRowFiller()
@@ -134,7 +134,7 @@ namespace BansheeEngine
 		Vector<ProfilerOverlayInternal::PreciseRow>& rows;
 
 		PreciseRowFiller(Vector<ProfilerOverlayInternal::PreciseRow>& _rows, GUILayout& _labelLayout, GUILayout& _contentLayout, GUIWidget& _widget)
-			:rows(_rows), curIdx(0), labelLayout(_labelLayout), contentLayout(_contentLayout), widget(_widget)
+			:curIdx(0), labelLayout(_labelLayout), contentLayout(_contentLayout), widget(_widget), rows(_rows)
 		{ }
 
 		~PreciseRowFiller()
@@ -234,7 +234,7 @@ namespace BansheeEngine
 		Vector<ProfilerOverlayInternal::GPUSampleRow>& rows;
 
 		GPUSampleRowFiller(Vector<ProfilerOverlayInternal::GPUSampleRow>& _rows, GUILayout& _layout, GUIWidget& _widget)
-			:rows(_rows), curIdx(0), layout(_layout), widget(_widget)
+			:curIdx(0), layout(_layout), widget(_widget), rows(_rows)
 		{ }
 
 		~GPUSampleRowFiller()
@@ -333,7 +333,7 @@ namespace BansheeEngine
 	}
 
 	ProfilerOverlayInternal::ProfilerOverlayInternal(const SPtr<Camera>& camera)
-		:mIsShown(true), mType(ProfilerOverlayType::CPUSamples)
+		:mType(ProfilerOverlayType::CPUSamples), mIsShown(true)
 	{
 		setTarget(camera);
 	}

+ 2 - 0
Source/BansheeEngine/Source/BsRenderQueue.cpp

@@ -46,6 +46,8 @@ namespace BansheeEngine
 		case QueueSortType::BackToFront:
 			distFromCamera = -distFromCamera;
 			break;
+		case QueueSortType::FrontToBack:
+			break;
 		}
 
 		UINT32 numPasses = material->getNumPasses();

+ 0 - 1
Source/BansheeEngine/Source/BsRendererUtility.cpp

@@ -261,7 +261,6 @@ namespace BansheeEngine
 	void RendererUtility::draw(const SPtr<MeshCoreBase>& mesh, const SubMesh& subMesh)
 	{
 		RenderAPICore& rs = RenderAPICore::instance();
-		const MeshProperties& meshProps = mesh->getProperties();
 		SPtr<VertexData> vertexData = mesh->getVertexData();
 
 		rs.setVertexDeclaration(vertexData->vertexDeclaration);

+ 0 - 4
Source/BansheeEngine/Source/BsShapeMeshes3D.cpp

@@ -55,9 +55,6 @@ namespace BansheeEngine
 
 	void ShapeMeshes3D::wireSphere(const Sphere& sphere, const SPtr<MeshData>& meshData, UINT32 vertexOffset, UINT32 indexOffset, UINT32 quality)
 	{
-		UINT32* indexData = meshData->getIndices32();
-		UINT8* positionData = meshData->getElementData(VES_POSITION);
-
 		UINT32 requiredNumVertices, requiredNumIndices;
 		getNumElementsWireSphere(quality, requiredNumVertices, requiredNumIndices);
 
@@ -403,7 +400,6 @@ namespace BansheeEngine
 		UINT32* outIndices, UINT32 indexOffset)
 	{
 		outVertices += (vertexOffset * vertexStride);
-		Vector3* corners = (Vector3*)outVertices;
 
 		// Front face
 		outVertices = writeVector3(outVertices, vertexStride, box.getCorner(AABox::NEAR_LEFT_BOTTOM));

+ 0 - 4
Source/BansheeEngine/Source/BsSprite.cpp

@@ -70,8 +70,6 @@ namespace BansheeEngine
 				UINT8* uvStart = uvDst;
 				UINT32 vertIdx = i * 4;
 
-				Vector2 vecPlusOffset = renderElem.vertices[vertIdx + 0] + vecOffset;
-
 				memcpy(vertDst, &renderElem.vertices[vertIdx + 0], sizeof(Vector2));
 				memcpy(uvDst, &renderElem.uvs[vertIdx + 0], sizeof(Vector2));
 
@@ -251,8 +249,6 @@ namespace BansheeEngine
 
 		for(UINT32 i = 0; i < numQuads; i++)
 		{
-			UINT32 vertIdx = i * 4;
-
 			Vector2* vecA = (Vector2*)(vertices);
 			Vector2* vecB = (Vector2*)(vertices + vertStride);
 			Vector2* vecC = (Vector2*)(vertices + vertStride * 2);

+ 1 - 1
Source/BansheeEngine/Source/BsSpriteTexture.cpp

@@ -9,7 +9,7 @@
 namespace BansheeEngine
 {
 	SpriteTexture::SpriteTexture(const Vector2& uvOffset, const Vector2& uvScale, const HTexture& texture)
-		:Resource(false), mUVOffset(uvOffset), mUVScale(uvScale), mAtlasTexture(texture)
+		:Resource(false), mAtlasTexture(texture), mUVOffset(uvOffset), mUVScale(uvScale)
 	{
 
 	}

+ 0 - 1
Source/BansheeEngine/Source/BsTextSprite.cpp

@@ -22,7 +22,6 @@ namespace BansheeEngine
 		{
 			TextData<FrameAlloc> textData(desc.text, desc.font, desc.fontSize, desc.width, desc.height, desc.wordWrap, desc.wordBreak);
 
-			UINT32 numLines = textData.getNumLines();
 			UINT32 numPages = textData.getNumPages();
 
 			// Free all previous memory

+ 2 - 2
Source/BansheeFBXImporter/Source/BsFBXPlugin.cpp

@@ -7,9 +7,9 @@
 namespace BansheeEngine
 {
 	/**	Returns a name of the plugin. */
-	extern "C" BS_FBX_EXPORT const String& getPluginName()
+	extern "C" BS_FBX_EXPORT const char* getPluginName()
 	{
-		static String pluginName = "FBXImporter";
+		static const char* pluginName = "FBXImporter";
 		return pluginName;
 	}
 

+ 2 - 2
Source/BansheeFontImporter/Source/BsFontPlugin.cpp

@@ -7,9 +7,9 @@
 namespace BansheeEngine
 {
 	/**	Returns a name of the plugin. */
-	extern "C" BS_FONT_EXPORT const String& getPluginName()
+	extern "C" BS_FONT_EXPORT const char* getPluginName()
 	{
-		static String pluginName = "FontImporter";
+		static const char* pluginName = "FontImporter";
 		return pluginName;
 	}
 

+ 2 - 2
Source/BansheeFreeImgImporter/Source/BsFreeImgPlugin.cpp

@@ -5,9 +5,9 @@
 
 namespace BansheeEngine
 {
-	extern "C" BS_FREEIMG_EXPORT const String& getPluginName()
+	extern "C" BS_FREEIMG_EXPORT const char* getPluginName()
 	{
-		static String pluginName = "FreeImageImporter";
+		static const char* pluginName = "FreeImageImporter";
 		return pluginName;
 	}
 

+ 2 - 2
Source/BansheeGLRenderAPI/Include/BsGLRenderAPIFactory.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 	 *  @{
 	 */
 
-	const String SystemName = "BansheeGLRenderSystem";
+	static const char* SystemName = "BansheeGLRenderSystem";
 
 	/** Handles creation of the OpenGL render system. */
 	class GLRenderAPIFactory : public RenderAPIFactory
@@ -23,7 +23,7 @@ namespace BansheeEngine
 		void create() override;
 
 		/** @copydoc RenderAPIFactory::name */
-		const String& name() const override { return SystemName; }
+		const char* name() const override { return SystemName; }
 
 	private:
 		/**	Registers the factory with the render system manager when constructed. */

+ 0 - 2
Source/BansheeGLRenderAPI/Source/BsGLFrameBufferObject.cpp

@@ -64,8 +64,6 @@ namespace BansheeEngine
         // Store basic stats
         UINT32 width = mColor[0].buffer->getWidth();
         UINT32 height = mColor[0].buffer->getHeight();
-        GLuint glformat = mColor[0].buffer->getGLFormat();
-        PixelFormat format = mColor[0].buffer->getFormat();
         UINT16 maxSupportedMRTs = BansheeEngine::RenderAPICore::instancePtr()->getCapabilities()->getNumMultiRenderTargets();
 
 		// Bind simple buffer to add color attachments

+ 1 - 1
Source/BansheeGLRenderAPI/Source/BsGLMultiRenderTexture.cpp

@@ -6,7 +6,7 @@
 namespace BansheeEngine
 {
 	GLMultiRenderTextureCore::GLMultiRenderTextureCore(const MULTI_RENDER_TEXTURE_CORE_DESC& desc)
-		:MultiRenderTextureCore(desc), mProperties(desc), mFB(nullptr)
+		:MultiRenderTextureCore(desc), mFB(nullptr), mProperties(desc)
 	{ }
 
 	GLMultiRenderTextureCore::~GLMultiRenderTextureCore()

+ 1 - 2
Source/BansheeGLRenderAPI/Source/BsGLOcclusionQuery.cpp

@@ -7,8 +7,7 @@
 namespace BansheeEngine
 {
 	GLOcclusionQuery::GLOcclusionQuery(bool binary)
-		:OcclusionQuery(binary), mQueryObj(0), 
-		mNumSamples(0), mFinalized(false), mEndIssued(false)
+		:OcclusionQuery(binary), mQueryObj(0), mFinalized(false), mEndIssued(false), mNumSamples(0)
 	{
 		glGenQueries(1, &mQueryObj);
 		BS_INC_RENDER_STAT_CAT(ResCreated, RenderStatObject_Query);

+ 3 - 1
Source/BansheeGLRenderAPI/Source/BsGLPixelFormat.cpp

@@ -239,9 +239,11 @@ namespace BansheeEngine
 			return GL_FLOAT;
 		case PF_D16:
 			return GL_UNSIGNED_SHORT;
+		default:
+			break;
 		}
 
-		BS_EXCEPT(InvalidParametersException, "Invalid depth stencil format");
+		LOGERR("Invalid depth stencil format");
 		return PF_D24S8;
 	}
 		

+ 1 - 1
Source/BansheeGLRenderAPI/Source/BsGLPlugin.cpp

@@ -3,7 +3,7 @@
 
 namespace BansheeEngine
 {
-	extern "C" BS_RSGL_EXPORT const String& getPluginName()
+	extern "C" BS_RSGL_EXPORT const char* getPluginName()
 	{
 		return SystemName;
 	}

+ 38 - 33
Source/BansheeGLRenderAPI/Source/BsGLRenderAPI.cpp

@@ -36,32 +36,32 @@ namespace BansheeEngine
 	/************************************************************************/
 
 	GLRenderAPI::GLRenderAPI()
-		: mDepthWrite(true),
-		mGLSLProgramFactory(nullptr),
-		mProgramPipelineManager(nullptr),
-		mActivePipeline(nullptr),
-		mActiveTextureUnit(0),
-		mScissorTop(0), mScissorBottom(720), mScissorLeft(0), mScissorRight(1280),
-		mViewportLeft(0), mViewportTop(0), mViewportWidth(0), mViewportHeight(0),
-		mStencilReadMask(0xFFFFFFFF),
-		mStencilWriteMask(0xFFFFFFFF),
-		mStencilCompareFront(CMPF_ALWAYS_PASS),
-		mStencilCompareBack(CMPF_ALWAYS_PASS),
-		mStencilRefValue(0),
-		mFragmentTexOffset(0),
-		mVertexTexOffset(0),
-		mGeometryTexOffset(0),
-		mTextureTypes(nullptr),
-		mNumTextureTypes(0),
-		mFragmentUBOffset(0),
-		mVertexUBOffset(0),
-		mGeometryUBOffset(0),
-		mHullUBOffset(0),
-		mDomainUBOffset(0),
-		mComputeUBOffset(0),
-		mDrawCallInProgress(false),
-		mCurrentDrawOperation(DOT_TRIANGLE_LIST),
-		mViewportNorm(0.0f, 0.0f, 1.0f, 1.0f)
+		: mViewportNorm(0.0f, 0.0f, 1.0f, 1.0f)
+		, mScissorTop(0), mScissorBottom(720), mScissorLeft(0), mScissorRight(1280)
+		, mViewportLeft(0), mViewportTop(0), mViewportWidth(0), mViewportHeight(0)
+		, mStencilReadMask(0xFFFFFFFF)
+		, mStencilWriteMask(0xFFFFFFFF)
+		, mStencilRefValue(0)
+		, mStencilCompareFront(CMPF_ALWAYS_PASS)
+		, mStencilCompareBack(CMPF_ALWAYS_PASS)
+		, mNumTextureTypes(0)
+		, mTextureTypes(nullptr)
+		, mDepthWrite(true)
+		, mGLSLProgramFactory(nullptr)
+		, mProgramPipelineManager(nullptr)
+		, mActivePipeline(nullptr)
+		, mFragmentTexOffset(0)
+		, mVertexTexOffset(0)
+		, mGeometryTexOffset(0)
+		, mFragmentUBOffset(0)
+		, mVertexUBOffset(0)
+		, mGeometryUBOffset(0)
+		, mHullUBOffset(0)
+		, mDomainUBOffset(0)
+		, mComputeUBOffset(0)
+		, mCurrentDrawOperation(DOT_TRIANGLE_LIST)
+		, mDrawCallInProgress(false)
+		, mActiveTextureUnit(0)
 	{
 		// Get our GLSupport
 		mGLSupport = BansheeEngine::getGLSupport();
@@ -366,6 +366,7 @@ namespace BansheeEngine
 			case GPDT_BOOL:
 				glProgramUniform1uiv(glProgram, paramDesc.gpuMemOffset, paramDesc.arraySize, (GLuint*)ptrData);
 				break;
+			default:
 			case GPDT_UNKNOWN:
 				break;
 			}
@@ -385,14 +386,10 @@ namespace BansheeEngine
 		THROW_IF_NOT_CORE_THREAD;
 
 		unit = getGLTextureUnit(gptype, unit);
-
-		SPtr<GLTextureCore> tex = std::static_pointer_cast<GLTextureCore>(texPtr);
-
-		GLenum lastTextureType = mTextureTypes[unit];
-
 		if (!activateGLTextureUnit(unit))
 			return;
 
+		SPtr<GLTextureCore> tex = std::static_pointer_cast<GLTextureCore>(texPtr);
 		if (enabled && tex)
 		{
 			mTextureTypes[unit] = tex->getGLTextureTarget();
@@ -1309,6 +1306,8 @@ namespace BansheeEngine
 			case FO_NONE:
 				glTexParameteri(mTextureTypes[unit], GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 				break;
+			default:
+				break;
 			}
 			break;
 		case FT_MIP:
@@ -1524,6 +1523,8 @@ namespace BansheeEngine
 			case FO_NONE:
 				// Linear min, no mip
 				return GL_LINEAR;
+			default:
+				break;
 			}
 			break;
 		case FO_POINT:
@@ -1540,8 +1541,12 @@ namespace BansheeEngine
 			case FO_NONE:
 				// Nearest min, no mip
 				return GL_NEAREST;
+			default:
+				break;
 			}
 			break;
+		default:
+			break;
 		}
 
 		// Should never get here
@@ -1633,7 +1638,7 @@ namespace BansheeEngine
 		}
 
 		UINT32 numSupportedUnits = mCurrentCapabilities->getNumTextureUnits(gptype);
-		if (unit < 0 || unit >= numSupportedUnits)
+		if (unit >= numSupportedUnits)
 		{
 			BS_EXCEPT(InvalidParametersException, "Invalid texture unit index for the provided stage. Unit index: " + toString(unit) + ". Stage: " +
 				toString(gptype) + ". Supported range is 0 .. " + toString(numSupportedUnits - 1));
@@ -1657,7 +1662,7 @@ namespace BansheeEngine
 	UINT32 GLRenderAPI::getGLUniformBlockBinding(GpuProgramType gptype, UINT32 binding)
 	{
 		UINT32 maxNumBindings = mCurrentCapabilities->getNumGpuParamBlockBuffers(gptype);
-		if (binding < 0 || binding >= maxNumBindings)
+		if (binding >= maxNumBindings)
 		{
 			BS_EXCEPT(InvalidParametersException, "Invalid buffer binding for the provided stage. Buffer binding: " + toString(binding) + ". Stage: " +
 				toString(gptype) + ". Supported range is 0 .. " + toString(maxNumBindings - 1));

+ 1 - 6
Source/BansheeGLRenderAPI/Source/BsGLRenderTexture.cpp

@@ -18,11 +18,6 @@ namespace BansheeEngine
 		GL_DEPTH32F_STENCIL8
 	};
 
-	static const UINT32 depthBits[] =
-	{
-		0, 16, 32, 24, 32
-	};
-
 #define DEPTHFORMAT_COUNT (sizeof(depthFormats)/sizeof(GLenum))
 
 	GLRenderTextureCore::GLRenderTextureCore(const RENDER_TEXTURE_CORE_DESC& desc)
@@ -325,7 +320,7 @@ namespace BansheeEngine
         case PCT_BYTE: format = PF_A8R8G8B8; break;
         case PCT_FLOAT16: format = PF_FLOAT16_RGBA; break;
         case PCT_FLOAT32: format = PF_FLOAT32_RGBA; break;
-        case PCT_COUNT: break;
+        default: break;
         }
 
         if(checkFormat(format))

+ 0 - 2
Source/BansheeGLRenderAPI/Source/BsGLSLParamParser.cpp

@@ -125,8 +125,6 @@ namespace BansheeEngine
 		newGlobalBlockDesc.blockSize = 0;
 		newGlobalBlockDesc.isShareable = false;
 
-		UINT32 textureSlot = 0;
-
 		returnParamDesc.paramBlocks[newGlobalBlockDesc.name] = newGlobalBlockDesc;
 		GpuParamBlockDesc& globalBlockDesc = returnParamDesc.paramBlocks[newGlobalBlockDesc.name];
 

+ 1 - 3
Source/BansheeGLRenderAPI/Source/BsGLTexture.cpp

@@ -16,7 +16,7 @@ namespace BansheeEngine
 	GLTextureCore::GLTextureCore(GLSupport& support, TextureType textureType, UINT32 width, UINT32 height, UINT32 depth, 
 		UINT32 numMipmaps, PixelFormat format, int usage, bool hwGamma, UINT32 multisampleCount, const SPtr<PixelData>& initialData)
 		: TextureCore(textureType, width, height, depth, numMipmaps, format, usage, hwGamma, multisampleCount, initialData),
-		mTextureID(0), mGLSupport(support), mGLFormat(0)
+		mTextureID(0), mGLFormat(0), mGLSupport(support)
     { }
 
 	GLTextureCore::~GLTextureCore()
@@ -225,8 +225,6 @@ namespace BansheeEngine
 
 	void GLTextureCore::copyImpl(UINT32 srcFace, UINT32 srcMipLevel, UINT32 destFace, UINT32 destMipLevel, const SPtr<TextureCore>& target)
 	{
-		size_t numMips = std::min(mProperties.getNumMipmaps(), target->getProperties().getNumMipmaps());
-
 		GLTextureCore* destTex = static_cast<GLTextureCore*>(target.get());
 		GLTextureBuffer *src = static_cast<GLTextureBuffer*>(getBuffer(srcFace, srcMipLevel).get());
 

+ 1 - 2
Source/BansheeGLRenderAPI/Source/BsGLTimerQuery.cpp

@@ -7,8 +7,7 @@
 namespace BansheeEngine
 {
 	GLTimerQuery::GLTimerQuery()
-		:mQueryStartObj(0), mQueryEndObj(0), 
-		mTimeDelta(0.0f), mFinalized(false), mEndIssued(false)
+		:mQueryStartObj(0), mQueryEndObj(0), mFinalized(false), mEndIssued(false), mTimeDelta(0.0f)
 	{
 		GLuint queries[2];
 		glGenQueries(2, queries);

部分文件因文件數量過多而無法顯示