You could also go with this:
public void doSomething(int input)
{
while(TransformInSomeWay(input), !ProcessingComplete(input))
{
DoSomethingElseTo(input);
}
}
public void doSomething(int input)
{
while(TransformInSomeWay(input), !ProcessingComplete(input))
{
DoSomethingElseTo(input);
}
}
Or less confusingly:
bool TransformAndCheckCompletion(int &input)
{
TransformInSomeWay(input);
return ProcessingComplete(input))
}
public void doSomething(int input)
{
while(TransformAndCheckCompletion(input))
{
DoSomethingElseTo(input);
}
}
bool TransformAndCheckCompletion(int &input)
{
TransformInSomeWay(input);
return ProcessingComplete(input))
}
public void doSomething(int input)
{
while(TransformAndCheckCompletion(input))
{
DoSomethingElseTo(input);
}
}