The strange thing with the first one is that this:
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
iBestShare = MAX_INT;
for (iI = 0; iI < MAX_TEAMS; iI++)
{
if (isTechShare(iI))
{
iBestShare = std::min(iBestShare, (iI + 1));
}
}
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
is the same as this:
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
iBestShare = MAX_INT;
for (iI = 0; iI < MAX_TEAMS; iI++)
{
if (isTechShare(iI))
{
iBestShare = iI + 1;
break;
}
}
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
I don't understand the purpose of the code, but something is probably amiss with it when it can be simplified like that.
I don't see anything strange with the second one.