mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 10:23:14 +08:00
Iterate directly over list in readIndex()
No need for range(len.. and later use of index...
This commit is contained in:
parent
81a34d1d18
commit
e54c859b2d
@ -866,13 +866,13 @@ def readIndex(node, attr):
|
||||
v = readIntArray(node, attr, [])
|
||||
chunks = []
|
||||
chunk = []
|
||||
for i in range(len(v)):
|
||||
if v[i] == -1:
|
||||
for i in v:
|
||||
if i == -1:
|
||||
if chunk:
|
||||
chunks.append(chunk)
|
||||
chunk = []
|
||||
else:
|
||||
chunk.append(v[i])
|
||||
chunk.append(i)
|
||||
if chunk:
|
||||
chunks.append(chunk)
|
||||
return chunks
|
||||
|
Loading…
x
Reference in New Issue
Block a user