1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-18 00:54:19 +00:00

Text: Fix some build issues when JUCE_STRING_UTF_TYPE != 8

This commit is contained in:
ed 2021-10-14 12:29:55 +01:00
parent 1f15f59db6
commit aabd65b0fd
4 changed files with 5 additions and 5 deletions

View file

@ -139,7 +139,7 @@ File File::getSpecialLocation (const SpecialLocationType type)
case invokedExecutableFile:
if (juce_argv != nullptr && juce_argc > 0)
return File (CharPointer_UTF8 (juce_argv[0]));
return File (String (CharPointer_UTF8 (juce_argv[0])));
// Falls through
JUCE_FALLTHROUGH

View file

@ -201,7 +201,7 @@ File File::getSpecialLocation (const SpecialLocationType type)
case invokedExecutableFile:
if (juce_argv != nullptr && juce_argc > 0)
return File::getCurrentWorkingDirectory().getChildFile (CharPointer_UTF8 (juce_argv[0]));
return File::getCurrentWorkingDirectory().getChildFile (String (CharPointer_UTF8 (juce_argv[0])));
// deliberate fall-through...
JUCE_FALLTHROUGH

View file

@ -1278,7 +1278,7 @@ String String::replaceSection (int index, int numCharsToReplace, StringRef strin
dest += newStringBytes;
memcpy (dest, startOfRemainder.getAddress(), remainderBytes);
dest += remainderBytes;
CharPointerType ((CharPointerType::CharType*) dest).writeNull();
CharPointerType (unalignedPointerCast<CharPointerType::CharType*> (dest)).writeNull();
return result;
}
@ -2149,7 +2149,7 @@ String String::fromUTF8 (const char* const buffer, int bufferSizeBytes)
JUCE_END_IGNORE_WARNINGS_MSVC
//==============================================================================
StringRef::StringRef() noexcept : text ((const String::CharPointerType::CharType*) "\0\0\0")
StringRef::StringRef() noexcept : text (unalignedPointerCast<const String::CharPointerType::CharType*> ("\0\0\0"))
{
}

View file

@ -125,7 +125,7 @@ private:
//==============================================================================
template <typename FuncType>
static FuncType getUiaFunction (HMODULE module, StringRef funcName)
static FuncType getUiaFunction (HMODULE module, LPCSTR funcName)
{
return (FuncType) GetProcAddress (module, funcName);
}