From 66a114d6ecb32a5112c3a3a2f1516954e41b3f4b Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Tue, 27 Feb 2018 14:15:06 +0000 Subject: [PATCH] Fix a couple of warnings --- components/sceneutil/shadow.cpp | 2 +- components/sceneutil/shadow.hpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/sceneutil/shadow.cpp b/components/sceneutil/shadow.cpp index 00e6b93a99..9b20544790 100644 --- a/components/sceneutil/shadow.cpp +++ b/components/sceneutil/shadow.cpp @@ -86,7 +86,7 @@ namespace SceneUtil Shader::ShaderManager::DefineMap definesWithShadows; definesWithShadows.insert(std::make_pair(std::string("shadows_enabled"), std::string("1"))); - for (int i = 0; i < mShadowSettings->getNumShadowMapsPerLight(); ++i) + for (unsigned int i = 0; i < mShadowSettings->getNumShadowMapsPerLight(); ++i) definesWithShadows["shadow_texture_unit_list"] += std::to_string(i) + ","; // remove extra comma definesWithShadows["shadow_texture_unit_list"] = definesWithShadows["shadow_texture_unit_list"].substr(0, definesWithShadows["shadow_texture_unit_list"].length() - 1); diff --git a/components/sceneutil/shadow.hpp b/components/sceneutil/shadow.hpp index 61a564a2a8..6a3fccea64 100644 --- a/components/sceneutil/shadow.hpp +++ b/components/sceneutil/shadow.hpp @@ -17,6 +17,8 @@ namespace SceneUtil ShadowManager(osg::ref_ptr sceneRoot, osg::ref_ptr rootNode, unsigned int outdoorShadowCastingMask, unsigned int indoorShadowCastingMask); + virtual ~ShadowManager() = default; + virtual void setupShadowSettings(); virtual Shader::ShaderManager::DefineMap getShadowDefines();