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.
- Reject surrogate code points for all unicode encodings
- Prevent out of bounds access in some cases
- Move ASCII and UTF character validation functions to CharacterFunctions
- Add more unit tests
This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
If an aiff file advertied a large number of metadata keys, the
StringPairArray::set calls resulted in quadratic complexity.
We now read keys into a std::map instead, as it enables much faster
lookup, and then convert back to a StringPairArray at the last possible
moment.