高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】odstringformat90 issue
odstring::format() issue
odstring::format() issue
hi,
can you make a version of odstring with member format, that returns a reference to the string:
odstring& odstring::format(...);
thus when a function needs a string parameter and time is not critical, one can simply say:
func_that_need_string( odstring().format(...) );
instead of:
odstring str;
str.format(...);
func_that_need_string( str );
the simpler, the better....
thanks
regards
chudomir
best regards
chudomir
i think it's good idea. and other functions like trimleft etc. too.
btw, i think that performance will not suffer if odstring& is returned instead of void (one more mov command)
sergey slezkin
this would be great if you do it!
also no existing code of your users will be changed since of ignoring the returned value.
thanks
regards
chudomir
best regards
chudomir
|