1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-22 01:34:21 +00:00

Added an option JUCE_ALLOW_STATIC_NULL_VARIABLES that can be used to turn off dangerous statics like String::empty, var::null, etc.

This commit is contained in:
jules 2016-09-16 12:02:35 +01:00
parent d03755c9e0
commit 9fa0d49be7
145 changed files with 407 additions and 343 deletions

View file

@ -715,7 +715,7 @@ void ComponentLayout::fillInGeneratedCode (GeneratedCode& code) const
String ComponentLayout::getComponentMemberVariableName (Component* comp) const
{
if (comp == nullptr)
return String::empty;
return String();
String name (comp->getProperties() ["memberName"].toString());
@ -730,7 +730,7 @@ void ComponentLayout::setComponentMemberVariableName (Component* comp, const Str
jassert (comp != nullptr);
const String oldName (getComponentMemberVariableName (comp));
comp->getProperties().set ("memberName", String::empty);
comp->getProperties().set ("memberName", String());
const String n (getUnusedMemberName (CodeHelpers::makeValidIdentifier (newName, false, true, false), comp));
comp->getProperties().set ("memberName", n);
@ -775,7 +775,7 @@ String ComponentLayout::getUnusedMemberName (String nameRoot, Component* comp) c
String ComponentLayout::getComponentVirtualClassName (Component* comp) const
{
if (comp == nullptr)
return String::empty;
return String();
return comp->getProperties() ["virtualName"];
}