1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #57436 from AnilBK/change-scopes

Scope Changes for some variables.
This commit is contained in:
Rémi Verschelde
2022-03-13 22:10:16 +01:00
committed by GitHub
4 changed files with 9 additions and 11 deletions

View File

@@ -265,15 +265,15 @@ bool Line2D::get_antialiased() const {
}
void Line2D::_draw() {
if (_points.size() <= 1 || _width == 0.f) {
int len = _points.size();
if (len <= 1 || _width == 0.f) {
return;
}
// TODO Is this really needed?
// Copy points for faster access
Vector<Vector2> points;
points.resize(_points.size());
int len = points.size();
points.resize(len);
{
const Vector2 *points_read = _points.ptr();
for (int i = 0; i < len; ++i) {