Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-11

TWidgetSet.GetTextExtentExPoint

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Hans-Peter Diettrich

The loop in this method is a bit weird. When the best fit is found, the loop continues but does nothing. IMO it should break instead, or fill the remaining array elements with defined values.

When both MaxCount and PartialWidths are Nil, the loop must not even be entered.

DoDi

Reply by email

Felipe Monteiro de Carvalho
to Hans-Peter Diettrich

Indeed it could be more optimized, I'll see about that later on, but note that this purely a question of optimization not correctness.

If MaxCount=PartialWidths=nil then you are using the wrong routine.

Felipe Monteiro de Carvalho

Reply by email