Mercurial > foo_out_sdl
comparison foosdk/sdk/pfc/sortstring.h @ 1:20d02a178406 default tip
*: check in everything else
yay
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 05 Jan 2026 02:15:46 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:e9bb126753e7 | 1:20d02a178406 |
|---|---|
| 1 #pragma once | |
| 2 | |
| 3 #ifdef _WIN32 | |
| 4 #include <memory> // std::unique_ptr<> | |
| 5 #endif | |
| 6 #ifdef __APPLE__ | |
| 7 #include "CFObject.h" | |
| 8 #endif | |
| 9 | |
| 10 namespace pfc { | |
| 11 #ifdef _WIN32 | |
| 12 typedef std::unique_ptr<wchar_t[]> sortString_t; | |
| 13 sortString_t makeSortString(const char* str); | |
| 14 sortString_t makeSortString(const wchar_t* str); | |
| 15 int sortStringCompare(sortString_t const& s1, sortString_t const& s2); | |
| 16 int sortStringCompareI(sortString_t const& s1, sortString_t const& s2); | |
| 17 #elif defined(__APPLE__) | |
| 18 typedef CFObject<CFStringRef> sortString_t; | |
| 19 sortString_t makeSortString(const char* str); | |
| 20 int sortStringCompare(sortString_t const& s1, sortString_t const& s2); | |
| 21 int sortStringCompareI(sortString_t const& s1, sortString_t const& s2); | |
| 22 #else | |
| 23 #define PFC_SORTSTRING_GENERIC | |
| 24 typedef pfc::string8 sortString_t; | |
| 25 inline sortString_t makeSortString(const char* str) { return str; } | |
| 26 inline sortString_t makeSortString(pfc::string8&& str) { return std::move(str); } | |
| 27 int sortStringCompare(const char* str1, const char* str2); | |
| 28 int sortStringCompareI(const char* str1, const char* str2); | |
| 29 #endif | |
| 30 } |
