1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-25 02:04:23 +00:00

Changed the Array::remove() method to return void, and added an Array::removeAndReturn() method to replace the old functionality

This commit is contained in:
jules 2016-07-07 15:02:05 +01:00
parent dd245effd2
commit b439452edd
5 changed files with 29 additions and 10 deletions

View file

@ -333,7 +333,7 @@ OpenDocumentManager::Document* RecentDocumentList::getPrevious()
if (! canGoToPrevious())
return nullptr;
nextDocs.insert (0, previousDocs.remove (previousDocs.size() - 1));
nextDocs.insert (0, previousDocs.removeAndReturn (previousDocs.size() - 1));
return previousDocs.getLast();
}
@ -342,7 +342,7 @@ OpenDocumentManager::Document* RecentDocumentList::getNext()
if (! canGoToNext())
return nullptr;
OpenDocumentManager::Document* d = nextDocs.remove (0);
OpenDocumentManager::Document* d = nextDocs.removeAndReturn (0);
previousDocs.add (d);
return d;
}