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();