mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +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:
parent
d03755c9e0
commit
9fa0d49be7
145 changed files with 407 additions and 343 deletions
|
|
@ -112,7 +112,7 @@ void ComboBox::addItem (const String& newItemText, const int newItemId)
|
|||
if (separatorPending)
|
||||
{
|
||||
separatorPending = false;
|
||||
items.add (new ItemInfo (String::empty, 0, false, false));
|
||||
items.add (new ItemInfo (String(), 0, false, false));
|
||||
}
|
||||
|
||||
items.add (new ItemInfo (newItemText, newItemId, true, false));
|
||||
|
|
@ -140,7 +140,7 @@ void ComboBox::addSectionHeading (const String& headingName)
|
|||
if (separatorPending)
|
||||
{
|
||||
separatorPending = false;
|
||||
items.add (new ItemInfo (String::empty, 0, false, false));
|
||||
items.add (new ItemInfo (String(), 0, false, false));
|
||||
}
|
||||
|
||||
items.add (new ItemInfo (headingName, 0, true, true));
|
||||
|
|
@ -219,7 +219,7 @@ String ComboBox::getItemText (const int index) const
|
|||
if (const ItemInfo* const item = getItemForIndex (index))
|
||||
return item->name;
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
int ComboBox::getItemId (const int index) const noexcept
|
||||
|
|
@ -274,7 +274,7 @@ int ComboBox::getSelectedId() const noexcept
|
|||
void ComboBox::setSelectedId (const int newItemId, const NotificationType notification)
|
||||
{
|
||||
const ItemInfo* const item = getItemForId (newItemId);
|
||||
const String newItemText (item != nullptr ? item->name : String::empty);
|
||||
const String newItemText (item != nullptr ? item->name : String());
|
||||
|
||||
if (lastCurrentId != newItemId || label->getText() != newItemText)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue