Change function to inline
This commit is contained in:
@@ -123,16 +123,13 @@ class Downloader:
|
|||||||
blocks = self.blocks
|
blocks = self.blocks
|
||||||
if len(blocks) == 1 : return self
|
if len(blocks) == 1 : return self
|
||||||
|
|
||||||
def is_overwrap(a, b):
|
|
||||||
return (blocks[a].last > blocks[b].first)
|
|
||||||
|
|
||||||
ret = []
|
ret = []
|
||||||
a = 0
|
a = 0
|
||||||
b = 1
|
b = 1
|
||||||
jmp = False
|
jmp = False
|
||||||
ret.append(blocks[0])
|
ret.append(blocks[0])
|
||||||
while a < len(blocks)-2:
|
while a < len(blocks)-2:
|
||||||
while is_overwrap(a,b):
|
while blocks[a].last > blocks[b].first:
|
||||||
b+=1
|
b+=1
|
||||||
if b == len(blocks)-1:
|
if b == len(blocks)-1:
|
||||||
jmp = True
|
jmp = True
|
||||||
|
|||||||
Reference in New Issue
Block a user