Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

About the F() macro and wxString::Format


I see this commit:

I remember that we have discussed several years ago, that the F() macro is not thread safe, it uses a global variable. So, maybe we will use wxString::Format to replace F()?

Miguel Gimenez:
I think the F() macro currently has no advantage over wxString::Format() and complicates the calls unnecesarily, forcing usage of wx_str().
The thread-safe part is one important reason to ditch it.

Also, calls to wxT() and _T() should be removed. There are a lot of code like this:

--- Code: ---if (String[n] == wxT('P'))
--- End code ---
that creates two temporary wxString and compares them, while this:

--- Code: ---if (String[n] == 'P')
--- End code ---
does a direct wxChar comparation.

Miguel Gimenez, I agree with your opinion.


[0] Message Index

Go to full version