mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Choice rendering now uses "style.image()" instead of "style.choice_images[value]";
Added script functions for working with multiple choice values; Added in_context support for filter_rule; Optimized toUpper/toLower because they are slow on windows (they use thread local storage and mutexes) git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@427 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+12
-2
@@ -88,8 +88,18 @@ inline bool isUpper(Char c) { return IF_UNICODE( iswupper(c) , isupper(c) ); }
|
||||
inline bool isLower(Char c) { return IF_UNICODE( iswlower(c) , islower(c) ); }
|
||||
inline bool isPunct(Char c) { return IF_UNICODE( iswpunct(c) , ispunct(c) ); }
|
||||
// Character conversions
|
||||
inline Char toUpper(Char c) { return IF_UNICODE( towupper(c) , toupper(c) ); }
|
||||
inline Char toLower(Char c) { return IF_UNICODE( towlower(c) , tolower(c) ); }
|
||||
#ifdef _MSC_VER
|
||||
#define CHAR_FUNCTIONS_ARE_SLOW
|
||||
#endif
|
||||
#ifdef CHAR_FUNCTIONS_ARE_SLOW
|
||||
// These functions are slow as hell on msvc.
|
||||
// If also in other compilers, they can also use these routines.
|
||||
Char toLower(Char c);
|
||||
Char toUpper(Char c);
|
||||
#else
|
||||
inline Char toLower(Char c) { return IF_UNICODE( towlower(c) , tolower(c) ); }
|
||||
inline Char toUpper(Char c) { return IF_UNICODE( towupper(c) , toupper(c) ); }
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------- : String utilities
|
||||
|
||||
|
||||
Reference in New Issue
Block a user