Browse Source

Minor clean-ups.

tags/2021-05-28
jules 12 years ago
parent
commit
213b5f87ff
2 changed files with 5 additions and 9 deletions
  1. +2
    -4
      modules/juce_core/containers/juce_Array.h
  2. +3
    -5
      modules/juce_core/containers/juce_LinkedListPointer.h

+ 2
- 4
modules/juce_core/containers/juce_Array.h View File

@@ -730,10 +730,8 @@ public:
minimiseStorageAfterRemoval();
return removed;
}
else
{
return ElementType();
}
return ElementType();
}
/** Removes an item from the array.


+ 3
- 5
modules/juce_core/containers/juce_LinkedListPointer.h View File

@@ -218,7 +218,7 @@ public:
ObjectType* const oldItem = item;
item = newItem;
item->nextListItem = oldItem->nextListItem.item;
oldItem->nextListItem = (ObjectType*) 0;
oldItem->nextListItem.item = nullptr;
return oldItem;
}
@@ -259,7 +259,7 @@ public:
if (oldItem != nullptr)
{
item = oldItem->nextListItem;
oldItem->nextListItem = (ObjectType*) 0;
oldItem->nextListItem.item = nullptr;
}
return oldItem;
@@ -270,9 +270,7 @@ public:
*/
void remove (ObjectType* const itemToRemove)
{
LinkedListPointer* const l = findPointerTo (itemToRemove);
if (l != nullptr)
if (LinkedListPointer* const l = findPointerTo (itemToRemove))
l->removeNext();
}


Loading…
Cancel
Save