In a recent version of Xcode (26.1) release builds would crash the
unittest runner during any tests using a std::vector<char32_t> where
its data was reinterpreted as const CharPointer_UTF32::CharType*.
Similar attempts were made to update the UTF8 a UTF16 tests,
unfortunately avoiding a reinterpret_cast for UTF16 isn't as easy
because CharPointer_UTF16 uses a signed integer type which makes the
test data more awkward to work with.
There's a few things going on in this commit:
- The implementation of CharPointer_UTF16 now uses helpers from
CharacterFunctions to avoid a few instances of magic numbers.
- Where it makes sense, member functions of that class have been DRYed
by e.g. implementing getAndAdvance in terms of operator*() and
operator++().
- Added more tests for incrementing/decrementing/dereferencing
CharPointer_UTF16.
After this change, a CharPointer_UTF16 that points to an unpaired
surrogate will always dereference to a 32-bit character with that
surrogate's value.
Note that dereferencing a CharPointer_UTF16 that points to a high
surrogate at the final code unit in a memory region is inherently
unsafe, because CharPointer_UTF16 can't track its own size, and the
dereference operation will check the following code unit to see whether
it is a low surrogate.
This may be due to a bug in the macOS SDK but the user facing
versions of these preprocessor definitions are returning the
incorrect details for at least the macOS 26 SDK
ObjCClass doesn't have other virtual methods; it is not intended to be
used as an interface or dynamic type. Removing the virtual destructor
is intended to promote composition over inheritance when using this
type.
This bug could be observed in the DemoRunner:
- Enable "button" navigation mode (as opposed to "gesture" mode) on the
Android device.
- Remove the line enabling kiosk mode, build and install the DemoRunner.
- Run the app and navigate to the Settings pane. Open a menu, or the
bluetooth MIDI dialog window, then close the popup window.
- Rotate the device.
Previously, the steps above could result in the system painting its own
backgrounds behind the system bars. With this patch in place, we reset
the requested system UI colours and transparency, which seems to
maintain the desired appearance.