From 1425c6def156840b359b90b4f32b9c7b8f005731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Wed, 21 Jun 2017 11:51:29 +0200 Subject: Cpp11 initializers: last src root changeset (#6022) * Cpp11 initializers: last src root changeset Finish to migrate all src root folder files to C++11 constructor initializers --- src/sky.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/sky.h') diff --git a/src/sky.h b/src/sky.h index a014a920b..1fa25bd93 100644 --- a/src/sky.h +++ b/src/sky.h @@ -117,25 +117,25 @@ private: return result; } - bool m_visible; - video::SColor m_fallback_bg_color; // Used when m_visible=false - bool m_first_update; + bool m_visible = true; + // Used when m_visible=false + video::SColor m_fallback_bg_color = video::SColor(255, 255, 255, 255); + bool m_first_update = true; float m_time_of_day; float m_time_brightness; bool m_sunlight_seen; - float m_brightness; - float m_cloud_brightness; + float m_brightness = 0.5f; + float m_cloud_brightness = 0.5f; bool m_clouds_visible; // Whether clouds are disabled due to player underground - bool m_clouds_enabled; // Initialised to true, reset only by set_sky API + bool m_clouds_enabled = true; // Initialised to true, reset only by set_sky API bool m_directional_colored_fog; - video::SColorf m_bgcolor_bright_f; - video::SColorf m_skycolor_bright_f; - video::SColorf m_cloudcolor_bright_f; + video::SColorf m_bgcolor_bright_f = video::SColorf(1.0f, 1.0f, 1.0f, 1.0f); + video::SColorf m_skycolor_bright_f = video::SColorf(1.0f, 1.0f, 1.0f, 1.0f); + video::SColorf m_cloudcolor_bright_f = video::SColorf(1.0f, 1.0f, 1.0f, 1.0f); video::SColor m_bgcolor; video::SColor m_skycolor; video::SColorf m_cloudcolor_f; v3f m_stars[SKY_STAR_COUNT]; - video::S3DVertex m_star_vertices[SKY_STAR_COUNT * 4]; video::ITexture *m_sun_texture; video::ITexture *m_moon_texture; video::ITexture *m_sun_tonemap; -- cgit v1.2.3