summaryrefslogtreecommitdiff
path: root/scene/2d/line_builder.cpp
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2017-09-01 22:33:39 +0200
committerHein-Pieter van Braam <hp@tmm.cx>2017-09-02 01:59:26 +0200
commit9c63ab99f0a505b0f60079bb30cc453b4415fddc (patch)
tree7014cb6e8c2e71a0583656f76d3d37d719a74fb0 /scene/2d/line_builder.cpp
parentdac150108ab3c1f41d5fd86cc6853f883064caaf (diff)
Fix use of unitialized variables
The second in my quest to make Godot 3.x compile with -Werror on GCC7
Diffstat (limited to 'scene/2d/line_builder.cpp')
-rw-r--r--scene/2d/line_builder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp
index 9eea5191b9..1235013af4 100644
--- a/scene/2d/line_builder.cpp
+++ b/scene/2d/line_builder.cpp
@@ -139,7 +139,7 @@ void LineBuilder::build() {
float current_distance0 = 0.f;
float current_distance1 = 0.f;
- float total_distance;
+ float total_distance = 0.f;
_interpolate_color = gradient != NULL;
bool distance_required = _interpolate_color || texture_mode == LINE_TEXTURE_TILE;
if (distance_required)