Oh, my minor original patch caused a large refactoring. :) br, Karvjorm 2010/12/21 <korli@xxxxxxxxxxxxxxxx>: > Author: korli > Date: 2010-12-21 20:48:12 +0100 (Tue, 21 Dec 2010) > New Revision: 39915 > Changeset: http://dev.haiku-os.org/changeset/39915 > > Modified: > haiku/trunk/src/preferences/notifications/IconRule.cpp > Log: > Based on remarks from Stephan and Axel. Thanks for reviewing. > * The list now owns its items > * MakeEmpty() is used to clear the list (also on destruction) > * RemoveIconAt() lets ItemAt() check the provided index and delete the item > * SlideToIcon(), SlideToNext(), SlideToPrevious() don't need to check invalid > values as ItemAt() will return a NULL pointer in this case.