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:
Axel Dörfler
2006-04-04 13:51:28 +00:00
parent cb2998af29
commit 6d9adcf120
+5 -7
View File
@@ -1818,18 +1818,16 @@ BMenu::ChooseTrigger(const char *title, BList *chars)
if (title == NULL)
return NULL;
char *titlePtr = const_cast<char *>(title);
char trigger;
// TODO: Oh great, reinterpret_cast all around
while ((trigger = *titlePtr) != '\0') {
while ((trigger = title[0]) != '\0') {
if (!chars->HasItem(reinterpret_cast<void *>((uint32)trigger))) {
chars->AddItem(reinterpret_cast<void *>((uint32)trigger));
return titlePtr;
return title;
}
titlePtr++;
title++;
}
return NULL;