1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-06 04:00:08 +00:00
JUCE/modules/juce_core
reuk 8b77aca786
CharPointer_UTF16: Make behaviour consistent when iterating through unpaired surrogates
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.
2025-11-18 18:54:47 +00:00
..
containers ScopedValueSetter: Make nodiscard 2025-11-18 15:47:42 +00:00
detail LruCache: Add workaround for GCC 15.2 bug 2025-10-20 17:34:48 +01:00
files Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
json Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
logging Update licensing information 2024-04-16 11:39:35 +01:00
maths Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
memory Docs: Update language to be more diplomatic 2025-11-18 15:47:42 +00:00
misc OptionsHelpers: Add a missing juce namespace 2025-09-18 13:36:58 +01:00
native Docs: Update language to be more diplomatic 2025-11-18 15:47:42 +00:00
network Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
serialisation Docs: Fix typo in juce_Serialisation.h 2025-09-22 11:01:03 +01:00
streams Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
system Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
text CharPointer_UTF16: Make behaviour consistent when iterating through unpaired surrogates 2025-11-18 18:54:47 +00:00
threads Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
time Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
unit_tests Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
xml Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
zip Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
juce_core.cpp Zlib: Update JUCE sources to support new zlib version 2025-02-25 12:47:13 +00:00
juce_core.h Smart Pointers: Add a new enum for indicating if a smart point should increment a reference count or not 2025-09-25 14:56:34 +01:00
juce_core.mm Update licensing information 2024-04-16 11:39:35 +01:00
juce_core_CompilationTime.cpp Core: Move __DATE__ and __TIME__ into a dedicated TU 2024-06-07 09:23:23 +01:00