// return early if all points are the same
for(int i=1; i<n; i++)
if(y[i] != y[0]) goto SKIP;
return;
SKIP:
Can someone help me with an alternative to this snippet that avoids
goto? Without introducing a new variable?
for(int i=1; i<n; i++)
if(y[i] != y[0]) goto SKIP;
return;
SKIP:
Can someone help me with an alternative to this snippet that avoids
goto? Without introducing a new variable?
Comment