@@ -82,13 +82,13 @@ Sky::Sky(s32 id, ITextureSource *tsrc, IShaderSource *ssrc) :
8282 // Ensures that sun and moon textures and tonemaps are correct.
8383 setSkyDefaults ();
8484 m_sun_texture = tsrc->isKnownSourceImage (m_sun_params.texture ) ?
85- tsrc->getTextureForMesh (m_sun_params.texture ) : NULL ;
85+ tsrc->getTextureForMesh (m_sun_params.texture ) : nullptr ;
8686 m_moon_texture = tsrc->isKnownSourceImage (m_moon_params.texture ) ?
87- tsrc->getTextureForMesh (m_moon_params.texture ) : NULL ;
87+ tsrc->getTextureForMesh (m_moon_params.texture ) : nullptr ;
8888 m_sun_tonemap = tsrc->isKnownSourceImage (m_sun_params.tonemap ) ?
89- tsrc->getTexture (m_sun_params.tonemap ) : NULL ;
89+ tsrc->getTexture (m_sun_params.tonemap ) : nullptr ;
9090 m_moon_tonemap = tsrc->isKnownSourceImage (m_moon_params.tonemap ) ?
91- tsrc->getTexture (m_moon_params.tonemap ) : NULL ;
91+ tsrc->getTexture (m_moon_params.tonemap ) : nullptr ;
9292
9393 if (m_sun_texture) {
9494 m_materials[3 ] = baseMaterial ();
@@ -744,14 +744,14 @@ void Sky::place_sky_body(
744744 }
745745}
746746
747- void Sky::setSunTexture (std::string sun_texture,
748- std::string sun_tonemap, ITextureSource *tsrc)
747+ void Sky::setSunTexture (const std::string & sun_texture,
748+ const std::string & sun_tonemap, ITextureSource *tsrc)
749749{
750750 // Ignore matching textures (with modifiers) entirely,
751751 // but lets at least update the tonemap before hand.
752752 m_sun_params.tonemap = sun_tonemap;
753753 m_sun_tonemap = tsrc->isKnownSourceImage (m_sun_params.tonemap ) ?
754- tsrc->getTexture (m_sun_params.tonemap ) : NULL ;
754+ tsrc->getTexture (m_sun_params.tonemap ) : nullptr ;
755755 m_materials[3 ].Lighting = !!m_sun_tonemap;
756756
757757 if (m_sun_params.texture == sun_texture)
@@ -780,7 +780,7 @@ void Sky::setSunTexture(std::string sun_texture,
780780 }
781781}
782782
783- void Sky::setSunriseTexture (std::string sunglow_texture,
783+ void Sky::setSunriseTexture (const std::string & sunglow_texture,
784784 ITextureSource* tsrc)
785785{
786786 // Ignore matching textures (with modifiers) entirely.
@@ -792,14 +792,14 @@ void Sky::setSunriseTexture(std::string sunglow_texture,
792792 );
793793}
794794
795- void Sky::setMoonTexture (std::string moon_texture,
796- std::string moon_tonemap, ITextureSource *tsrc)
795+ void Sky::setMoonTexture (const std::string & moon_texture,
796+ const std::string & moon_tonemap, ITextureSource *tsrc)
797797{
798798 // Ignore matching textures (with modifiers) entirely,
799799 // but lets at least update the tonemap before hand.
800800 m_moon_params.tonemap = moon_tonemap;
801801 m_moon_tonemap = tsrc->isKnownSourceImage (m_moon_params.tonemap ) ?
802- tsrc->getTexture (m_moon_params.tonemap ) : NULL ;
802+ tsrc->getTexture (m_moon_params.tonemap ) : nullptr ;
803803 m_materials[4 ].Lighting = !!m_moon_tonemap;
804804
805805 if (m_moon_params.texture == moon_texture)
@@ -893,7 +893,7 @@ void Sky::setSkyColors(const SkyColor &sky_color)
893893}
894894
895895void Sky::setHorizonTint (video::SColor sun_tint, video::SColor moon_tint,
896- std::string use_sun_tint)
896+ const std::string & use_sun_tint)
897897{
898898 // Change sun and moon tinting:
899899 m_sky_params.fog_sun_tint = sun_tint;
@@ -907,7 +907,7 @@ void Sky::setHorizonTint(video::SColor sun_tint, video::SColor moon_tint,
907907 m_default_tint = true ;
908908}
909909
910- void Sky::addTextureToSkybox (std::string texture, int material_id,
910+ void Sky::addTextureToSkybox (const std::string & texture, int material_id,
911911 ITextureSource *tsrc)
912912{
913913 // Sanity check for more than six textures.
0 commit comments