Browse Source

Removed assertions about invalid characters in Identifier constructors.

tags/2021-05-28
jules 10 years ago
parent
commit
18dd0af6c1
1 changed files with 6 additions and 9 deletions
  1. +6
    -9
      modules/juce_core/text/juce_Identifier.cpp

+ 6
- 9
modules/juce_core/text/juce_Identifier.cpp View File

@@ -40,25 +40,22 @@ Identifier& Identifier::operator= (const Identifier other) noexcept
Identifier::Identifier (const String& nm)
: name (StringPool::getGlobalPool().getPooledString (nm))
{
/* An Identifier string must be suitable for use as a script variable or XML
attribute, so it can only contain this limited set of characters.. */
jassert (isValidIdentifier (toString()));
// An Identifier cannot be created from an empty string!
jassert (nm.isNotEmpty());
}
Identifier::Identifier (const char* nm)
: name (StringPool::getGlobalPool().getPooledString (nm))
{
/* An Identifier string must be suitable for use as a script variable or XML
attribute, so it can only contain this limited set of characters.. */
jassert (isValidIdentifier (toString()));
// An Identifier cannot be created from an empty string!
jassert (nm != nullptr && nm[0] != 0);
}
Identifier::Identifier (String::CharPointerType start, String::CharPointerType end)
: name (StringPool::getGlobalPool().getPooledString (start, end))
{
/* An Identifier string must be suitable for use as a script variable or XML
attribute, so it can only contain this limited set of characters.. */
jassert (isValidIdentifier (toString()));
// An Identifier cannot be created from an empty string!
jassert (start < end);
}
Identifier Identifier::null;


Loading…
Cancel
Save