Skip to content
Snippets Groups Projects
Commit 729b1221 authored by Andrea Bulgarelli's avatar Andrea Bulgarelli
Browse files

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

parent 76887f82
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment