Configuration option to use std::string as CEGUI::String

Create issue
Issue #421 resolved
Martin Preisler created an issue

I have created a patch that allows CEGUI to use both the inbuilt utf32 String as well as std::string (with 8bit characters). std::string has lower memory requirements and can be (in very special circumstances) faster (easier pass by const reference, etc...).

This is intended for library users not needing Unicode support (which I imagine is a large percentage).

Reproducibility: N/A

Additional information: This patch adds a configuration switch CEGUI_STRING_CLASS, three options are available:

Unicode - utf32 inbuilt string - utf8 and utf32 support std::string - no unicode support std::string allocated with allocators - same but pass by reference can be harder but is allocated according to the allocator config

This has not been committed yet! The only macro preprocessor if/ifdefs are in CEGUIString.h and CEGUIDefaultResourceProvider.h (in the Windows-only utf16 to utf8/char conversion functions).

Comments (1)

  1. Log in to comment