Changes to allow Haiku source to build with GCC 4.7

* GCC 4.7 is more picky than GCC 4.6, so have to make changes accordingly
* Changes include addressing issues with scoping, redeclaration, etc.
Thanks Rene and Ingo for your input on these changes
This commit is contained in:
Joseph R. Prostko 2012-11-15 17:55:57 -05:00
parent 2df12e67c1
commit caddc641c1
5 changed files with 12 additions and 6 deletions

View File

@ -1328,7 +1328,7 @@ MenuItem<ParentBuilder>::MenuItem(ParentBuilder* parentBuilder, BMenu* menu,
Menu<ParentBuilder>(menu),
fMenuItem(item)
{
SetParent(parentBuilder);
this->SetParent(parentBuilder);
}

View File

@ -224,10 +224,10 @@ BootPromptWindow::MessageReceived(BMessage* message)
// Select default keymap by language
BLanguage language(item->Language());
BMenuItem* item = _KeymapItemForLanguage(language);
if (item != NULL) {
item->SetMarked(true);
_ActivateKeymap(item->Message());
BMenuItem* keymapItem = _KeymapItemForLanguage(language);
if (keymapItem != NULL) {
keymapItem->SetMarked(true);
_ActivateKeymap(keymapItem->Message());
}
}
// Calling it here is a cheap way of preventing the user to have

View File

@ -6,6 +6,8 @@
*/
#include <stdlib.h>
#include <SupportDefs.h>

View File

@ -30,6 +30,10 @@ struct BAbstractLayout::Proxy {
{
}
virtual ~Proxy()
{
}
virtual BSize MinSize() const = 0;
virtual void SetMinSize(const BSize&) = 0;

View File

@ -222,7 +222,7 @@ bool
BLayout::RemoveItem(BLayoutItem* item)
{
int32 index = IndexOfItem(item);
return (index >= 0 ? RemoveItem(index) : false);
return (index >= 0 ? RemoveItem(index) != NULL : false);
}