| @@ -139,7 +139,7 @@ File File::getSpecialLocation (const SpecialLocationType type) | |||||
| case invokedExecutableFile: | case invokedExecutableFile: | ||||
| if (juce_argv != nullptr && juce_argc > 0) | if (juce_argv != nullptr && juce_argc > 0) | ||||
| return File (CharPointer_UTF8 (juce_argv[0])); | |||||
| return File (String (CharPointer_UTF8 (juce_argv[0]))); | |||||
| // Falls through | // Falls through | ||||
| JUCE_FALLTHROUGH | JUCE_FALLTHROUGH | ||||
| @@ -201,7 +201,7 @@ File File::getSpecialLocation (const SpecialLocationType type) | |||||
| case invokedExecutableFile: | case invokedExecutableFile: | ||||
| if (juce_argv != nullptr && juce_argc > 0) | 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... | // deliberate fall-through... | ||||
| JUCE_FALLTHROUGH | JUCE_FALLTHROUGH | ||||
| @@ -1278,7 +1278,7 @@ String String::replaceSection (int index, int numCharsToReplace, StringRef strin | |||||
| dest += newStringBytes; | dest += newStringBytes; | ||||
| memcpy (dest, startOfRemainder.getAddress(), remainderBytes); | memcpy (dest, startOfRemainder.getAddress(), remainderBytes); | ||||
| dest += remainderBytes; | dest += remainderBytes; | ||||
| CharPointerType ((CharPointerType::CharType*) dest).writeNull(); | |||||
| CharPointerType (unalignedPointerCast<CharPointerType::CharType*> (dest)).writeNull(); | |||||
| return result; | return result; | ||||
| } | } | ||||
| @@ -2149,7 +2149,7 @@ String String::fromUTF8 (const char* const buffer, int bufferSizeBytes) | |||||
| JUCE_END_IGNORE_WARNINGS_MSVC | 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")) | |||||
| { | { | ||||
| } | } | ||||
| @@ -125,7 +125,7 @@ private: | |||||
| //============================================================================== | //============================================================================== | ||||
| template <typename FuncType> | template <typename FuncType> | ||||
| static FuncType getUiaFunction (HMODULE module, StringRef funcName) | |||||
| static FuncType getUiaFunction (HMODULE module, LPCSTR funcName) | |||||
| { | { | ||||
| return (FuncType) GetProcAddress (module, funcName); | return (FuncType) GetProcAddress (module, funcName); | ||||
| } | } | ||||