diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-10 20:06:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 20:06:12 +0100 |
commit | e8f73124a7d97abc94cea3cf7fe5b5614f61a448 (patch) | |
tree | ff99e368359d56d760c8617af1021d0313635e38 /scene/gui/texture_progress_bar.cpp | |
parent | 3c39aa8302a4f07a1470685bbf66f883c49f571e (diff) | |
parent | 7961a1dea3e7ce8c4e7197a0000e35ab31e9ff2e (diff) |
Merge pull request #45845 from qarmin/cppcheck_scene_2
Initialize class variables with default values in scene/ [2/2]
Diffstat (limited to 'scene/gui/texture_progress_bar.cpp')
-rw-r--r-- | scene/gui/texture_progress_bar.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/scene/gui/texture_progress_bar.cpp b/scene/gui/texture_progress_bar.cpp index 76564e2b17..46ce9d5ca9 100644 --- a/scene/gui/texture_progress_bar.cpp +++ b/scene/gui/texture_progress_bar.cpp @@ -145,9 +145,9 @@ Point2 TextureProgressBar::unit_val_to_uv(float val) { float angle = (val * Math_TAU) - Math_PI * 0.5; Point2 dir = Vector2(Math::cos(angle), Math::sin(angle)); float t1 = 1.0; - float cp = 0; - float cq = 0; - float cr = 0; + float cp = 0.0; + float cq = 0.0; + float cr = 0.0; float edgeLeft = 0.0; float edgeRight = 1.0; float edgeBottom = 0.0; @@ -540,17 +540,5 @@ void TextureProgressBar::_bind_methods() { } TextureProgressBar::TextureProgressBar() { - mode = FILL_LEFT_TO_RIGHT; - rad_init_angle = 0; - rad_center_off = Point2(); - rad_max_degrees = 360; set_mouse_filter(MOUSE_FILTER_PASS); - - nine_patch_stretch = false; - stretch_margin[SIDE_LEFT] = 0; - stretch_margin[SIDE_RIGHT] = 0; - stretch_margin[SIDE_BOTTOM] = 0; - stretch_margin[SIDE_TOP] = 0; - - tint_under = tint_progress = tint_over = Color(1, 1, 1); } |