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:59:19 -05:00
parent 2df12e67c1
commit caddc641c1
5 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -1328,7 +1328,7 @@ MenuItem<ParentBuilder>::MenuItem(ParentBuilder* parentBuilder, BMenu* menu,
Menu<ParentBuilder>(menu), Menu<ParentBuilder>(menu),
fMenuItem(item) fMenuItem(item)
{ {
SetParent(parentBuilder); this->SetParent(parentBuilder);
} }
@@ -224,10 +224,10 @@ BootPromptWindow::MessageReceived(BMessage* message)
// Select default keymap by language // Select default keymap by language
BLanguage language(item->Language()); BLanguage language(item->Language());
BMenuItem* item = _KeymapItemForLanguage(language); BMenuItem* keymapItem = _KeymapItemForLanguage(language);
if (item != NULL) { if (keymapItem != NULL) {
item->SetMarked(true); keymapItem->SetMarked(true);
_ActivateKeymap(item->Message()); _ActivateKeymap(keymapItem->Message());
} }
} }
// Calling it here is a cheap way of preventing the user to have // Calling it here is a cheap way of preventing the user to have
+2
View File
@@ -6,6 +6,8 @@
*/ */
#include <stdlib.h>
#include <SupportDefs.h> #include <SupportDefs.h>
+4
View File
@@ -30,6 +30,10 @@ struct BAbstractLayout::Proxy {
{ {
} }
virtual ~Proxy()
{
}
virtual BSize MinSize() const = 0; virtual BSize MinSize() const = 0;
virtual void SetMinSize(const BSize&) = 0; virtual void SetMinSize(const BSize&) = 0;
+1 -1
View File
@@ -222,7 +222,7 @@ bool
BLayout::RemoveItem(BLayoutItem* item) BLayout::RemoveItem(BLayoutItem* item)
{ {
int32 index = IndexOfItem(item); int32 index = IndexOfItem(item);
return (index >= 0 ? RemoveItem(index) : false); return (index >= 0 ? RemoveItem(index) != NULL : false);
} }