fixed static_cast to preserve constness

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4205 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty 2003-08-02 08:44:48 +00:00
parent 4b45d1a25c
commit 9027cb99aa

View File

@ -159,8 +159,8 @@ MediaListItem::Update(BView *owner, const BFont *finfo)
int
MediaListItem::Compare(const void *firstArg, const void *secondArg)
{
MediaListItem *item1 = *static_cast<MediaListItem **>(firstArg);
MediaListItem *item2 = *static_cast<MediaListItem **>(secondArg);
const MediaListItem *item1 = *static_cast<const MediaListItem * const *>(firstArg);
const MediaListItem *item2 = *static_cast<const MediaListItem * const *>(secondArg);
if(item1->mIsVideo != item2->mIsVideo)
return item1->mIsVideo ? 1 : -1;
if(item1->OutlineLevel()!=item2->OutlineLevel())