diff --git a/extras/Demo/Source/Demos/ChildProcessDemo.cpp b/extras/Demo/Source/Demos/ChildProcessDemo.cpp index a4e375daf4..a2c1145c2e 100644 --- a/extras/Demo/Source/Demos/ChildProcessDemo.cpp +++ b/extras/Demo/Source/Demos/ChildProcessDemo.cpp @@ -77,8 +77,8 @@ public: testResultsBox.setMultiLine (true); testResultsBox.setFont (Font (Font::getDefaultMonospacedFontName(), 12.0f, Font::plain)); - logMessage ("This demo uses the ChildProcessMaster and ChildProcessSlave classes to launch and communicate " - "with a child process, sending messages in the form of serialised ValueTree objects." + newLine); + logMessage (String ("This demo uses the ChildProcessMaster and ChildProcessSlave classes to launch and communicate " + "with a child process, sending messages in the form of serialised ValueTree objects.") + newLine); } ~ChildProcessDemo() diff --git a/modules/juce_core/text/juce_StringPool.cpp b/modules/juce_core/text/juce_StringPool.cpp index 505862236e..f8fd5a7869 100644 --- a/modules/juce_core/text/juce_StringPool.cpp +++ b/modules/juce_core/text/juce_StringPool.cpp @@ -42,7 +42,7 @@ struct StartEndString }; static int compareStrings (const String& s1, const String& s2) noexcept { return s1.compare (s2); } -static int compareStrings (CharPointer_UTF8 s1, const String& s2) noexcept { return s1.compare (s2.toUTF8()); } +static int compareStrings (CharPointer_UTF8 s1, const String& s2) noexcept { return s1.compare (s2.getCharPointer()); } static int compareStrings (const StartEndString& string1, const String& string2) noexcept { diff --git a/modules/juce_core/xml/juce_XmlElement.cpp b/modules/juce_core/xml/juce_XmlElement.cpp index f372e76da9..469f382a49 100644 --- a/modules/juce_core/xml/juce_XmlElement.cpp +++ b/modules/juce_core/xml/juce_XmlElement.cpp @@ -71,6 +71,12 @@ XmlElement::XmlElement (const char* tag) sanityCheckTagName (tagName); } +XmlElement::XmlElement (StringRef tag) + : tagName (StringPool::getGlobalPool().getPooledString (tag.text.getAddress())) +{ + sanityCheckTagName (tagName); +} + XmlElement::XmlElement (const Identifier& tag) : tagName (tag.toString()) { diff --git a/modules/juce_core/xml/juce_XmlElement.h b/modules/juce_core/xml/juce_XmlElement.h index 251f826921..4ab4d0886e 100644 --- a/modules/juce_core/xml/juce_XmlElement.h +++ b/modules/juce_core/xml/juce_XmlElement.h @@ -152,6 +152,9 @@ public: /** Creates an XmlElement with this tag name. */ explicit XmlElement (const Identifier& tagName); + /** Creates an XmlElement with this tag name. */ + explicit XmlElement (StringRef tagName); + /** Creates an XmlElement with this tag name. */ XmlElement (String::CharPointerType tagNameBegin, String::CharPointerType tagNameEnd);