Hi,
okay i see what you really meant now
My first guess is that your idea involves slightly more then an #ifdef. You can indeed put the #ifdef in the CEGUIString.h file, thereby skipping the declaration of the String class, and then say something like:
Code: Select all
typedef std::wstring CEGUI::String;
(I'd prefer typedef over a define).
However, the Cegui String has methods which might not be available in the std::wstring, or are at least named differently.
Another idea is to inherit the Cegui string from the std::wstring, and implement the methods by calling the wstring versions, thereby not breaking any client code.
But keep in mind: i am not the author of the library, but from what i have seen of cegui so far, is that the String class is used often. Besides, i think that the reason for the Cegui String is that it's 'real' unicode, where the wstring isn't. So be very carefull with hacking it
Btw. what is your problem with a conversion? Do you have serious performance requirements or something?
Good luck
