Commit 729b1221 authored by Andrea Bulgarelli's avatar Andrea Bulgarelli
Browse files

first optimization of the getBlock() if rBlockIndex==0

parent 76887f82
Loading
Loading
Loading
Loading
−501 B (41.5 KiB)

File changed.

No diff preview for this file type.

+63 KiB (1.58 MiB)

File changed.

No diff preview for this file type.

+4 −1
Original line number Diff line number Diff line
@@ -374,6 +374,8 @@ dword SDFBlock::size()

SDFBlock* SDFBlock::getBlock(word nblock, word rBlockIndex)
{
	if(rBlockIndex == 0)
		return &block[nblock];
	word bi = 0;
    word rbi = 0;
    for(int i=0; i< type->nblockmax; i++)
@@ -383,6 +385,7 @@ SDFBlock* SDFBlock::getBlock(word nblock, word rBlockIndex)
        if(rbi == rBlockIndex && bi == nblock)
            return &block[i];
    }
	
    return 0;
}