Browse Source

Text: Fix some build issues when JUCE_STRING_UTF_TYPE != 8

v6.1.6
ed 4 years ago
parent
commit
aabd65b0fd
4 changed files with 5 additions and 5 deletions
  1. +1
    -1
      modules/juce_core/native/juce_linux_Files.cpp
  2. +1
    -1
      modules/juce_core/native/juce_mac_Files.mm
  3. +2
    -2
      modules/juce_core/text/juce_String.cpp
  4. +1
    -1
      modules/juce_gui_basics/native/accessibility/juce_win32_WindowsUIAWrapper.h

+ 1
- 1
modules/juce_core/native/juce_linux_Files.cpp 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


+ 1
- 1
modules/juce_core/native/juce_mac_Files.mm 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


+ 2
- 2
modules/juce_core/text/juce_String.cpp 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"))
{
}


+ 1
- 1
modules/juce_gui_basics/native/accessibility/juce_win32_WindowsUIAWrapper.h 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);
}


Loading…
Cancel
Save