Browse Source

Couple of fixes for a UTF-32 build.

tags/2021-05-28
jules 11 years ago
parent
commit
69ff02b46c
4 changed files with 12 additions and 3 deletions
  1. +2
    -2
      extras/Demo/Source/Demos/ChildProcessDemo.cpp
  2. +1
    -1
      modules/juce_core/text/juce_StringPool.cpp
  3. +6
    -0
      modules/juce_core/xml/juce_XmlElement.cpp
  4. +3
    -0
      modules/juce_core/xml/juce_XmlElement.h

+ 2
- 2
extras/Demo/Source/Demos/ChildProcessDemo.cpp View File

@@ -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()


+ 1
- 1
modules/juce_core/text/juce_StringPool.cpp View File

@@ -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
{


+ 6
- 0
modules/juce_core/xml/juce_XmlElement.cpp View File

@@ -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())
{


+ 3
- 0
modules/juce_core/xml/juce_XmlElement.h View File

@@ -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);


Loading…
Cancel
Save