Personally, I say if a statement continues on a different line, then you should use braces
//okay
if (condition) return foo;
//not okay
if (condition)
return foo;
//not okay
if (condition) do_foo();
else do_bar();
In the second case, the else can be considered a continuation. In the first example, there's little chance of confusion or the introduction of an error, in the second and third, that is not necessarily the case.
If it doesn't look/fit well on one line, break it up with braces.
Nice, in that case, I might advocate for either somefunc or a function in front of it taking somevar, othervar and i as parameters with early return statements before falling through to the work.. returning a boolean for if they passed through...
> Do not unnecessarily use braces around a single statement
If you consider all braces to be necessary, then that's a truism and you can safely ignore it. "I didn't unnecessarily use them: we always use them because that's the safe thing to do."
If it doesn't look/fit well on one line, break it up with braces.