bug with wxVariant

Vadim Zeitlin vadim at wxwindows.org
Thu Oct 12 05:02:56 PDT 2006


On Wed, 11 Oct 2006 22:21:26 -0400 Sebastien Senechal <seb at cyberdine.ca> wrote:

SS> by the way
SS> 
SS> This is a two steps fonction
SS> long var;
SS> str.ToLong(&var)
SS> 
SS> wxVariant(str).GetLong() ... is one line, no brackets, etc... faster.

 "Faster"? What about

	long v; str.ToLong(&v);

would this be as fast? Or maybe even faster as it's one character shorter?

 Also, ToLong() brings you this utterly useless feature which is the
possibility that the string actually represents a number (it has a return
value). Of course, this just slows it down even more, I know.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list