Removed a superfluous const_cast and a variable from ChooseTrigger().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17007 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1818,18 +1818,16 @@ BMenu::ChooseTrigger(const char *title, BList *chars)
|
|||||||
|
|
||||||
if (title == NULL)
|
if (title == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
char *titlePtr = const_cast<char *>(title);
|
|
||||||
|
|
||||||
char trigger;
|
char trigger;
|
||||||
// TODO: Oh great, reinterpret_cast all around
|
// TODO: Oh great, reinterpret_cast all around
|
||||||
while ((trigger = *titlePtr) != '\0') {
|
while ((trigger = title[0]) != '\0') {
|
||||||
if (!chars->HasItem(reinterpret_cast<void *>((uint32)trigger))) {
|
if (!chars->HasItem(reinterpret_cast<void *>((uint32)trigger))) {
|
||||||
chars->AddItem(reinterpret_cast<void *>((uint32)trigger));
|
chars->AddItem(reinterpret_cast<void *>((uint32)trigger));
|
||||||
return titlePtr;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
titlePtr++;
|
title++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user