I was compiling this piece of code within the SDK of a program, and there was this piece
[code=c]
if (horizontal)
for (y = 0; y < allocy; ++y)
for (x = 0; x < allocx/2; ++x)
{
opus_pixel tmp;
tmp = pixels[y * allocx + x];
pixels[y * allocx + x] = pixels[y * allocx + allocx - x - 1];
pixels[y * allocx + allocx - x - 1] = tmp;
}
[/code]
How come a part of it has brackets and another doesn't, it compiled just fine when i did.
Thanks for any info
[code=c]
if (horizontal)
for (y = 0; y < allocy; ++y)
for (x = 0; x < allocx/2; ++x)
{
opus_pixel tmp;
tmp = pixels[y * allocx + x];
pixels[y * allocx + x] = pixels[y * allocx + allocx - x - 1];
pixels[y * allocx + allocx - x - 1] = tmp;
}
[/code]
How come a part of it has brackets and another doesn't, it compiled just fine when i did.
Thanks for any info
Comment