2010
29
Dec

Function call operator overload

Following Jotaf's advice, I overloaded the function call operator in the style sheets. Previously, in order to retrieve the value of a style property, my suggestion was calling the value() method:

TCODColor col = myWidget->style.normal.colour.value();

Since a function call is involved anyway, Jotaf suggested it was better to overload the function call operator and use it directly on the property in order to retrieve its value:

TCODColor col = myWidget->style.normal.colour();

This is shorter and probably more intuitive. Thanks, Jotaf!

Comments

Hehe awesome, I'm glad it was

Hehe awesome, I'm glad it was helpful :) The Umbra architecture keeps getting better and better!