1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

Merge pull request #10908 from hpvb/fix-unused-variables

Fix unused variable warnings
This commit is contained in:
Rémi Verschelde
2017-09-12 12:55:53 +02:00
committed by GitHub
38 changed files with 70 additions and 210 deletions

View File

@@ -84,15 +84,6 @@ int Curve::add_point(Vector2 p_pos, real_t left_tangent, real_t right_tangent, T
int i = get_index(p_pos.x);
int nearest_index = i;
if (i + 1 < _points.size()) {
real_t diff0 = p_pos.x - _points[i].pos.x;
real_t diff1 = _points[i + 1].pos.x - p_pos.x;
if (diff1 < diff0)
nearest_index = i + 1;
}
if (i == 0 && p_pos.x < _points[0].pos.x) {
// Insert before anything else
_points.insert(0, Point(p_pos, left_tangent, right_tangent, left_mode, right_mode));