From a636d1e365b1abffccb41dc16ff832e5d577f0aa Mon Sep 17 00:00:00 2001 From: Fredrik Holmqvist Date: Sat, 17 Jul 2010 10:33:24 +0000 Subject: [PATCH] Patch by kaliber to fix some compiling errors with clang. Removed the #include part, but otherwise not modified. See http://clang.llvm.org/compatibility.html#c++ why it is needed. Note that HashMap.h Key and Value are typenames as well. Afaict this is correctly done, builds and runs on gcc4. This fixes #5892. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37550 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/fenv.h | 2 +- headers/private/kernel/util/MultiHashTable.h | 8 ++++---- headers/private/shared/HashMap.h | 2 +- src/preferences/cpufrequency/PreferencesWindow.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/headers/posix/fenv.h b/headers/posix/fenv.h index 4dcc8e68e7..0fb1e203c9 100644 --- a/headers/posix/fenv.h +++ b/headers/posix/fenv.h @@ -1,7 +1,7 @@ #ifndef _FENV_H #define _FENV_H -#if defined(_X86_) +#if defined(__INTEL__) # include #elif defined(_x86_64_) # include diff --git a/headers/private/kernel/util/MultiHashTable.h b/headers/private/kernel/util/MultiHashTable.h index 2313d6c4b1..2549198fcb 100644 --- a/headers/private/kernel/util/MultiHashTable.h +++ b/headers/private/kernel/util/MultiHashTable.h @@ -143,10 +143,10 @@ private: previous = HashTable::_Link(previous)); if (previous) { - _Link(value) = _Link(previous); - _Link(previous) = value; + HashTable::_Link(value) = HashTable::_Link(previous); + HashTable::_Link(previous) = value; } else { - _Link(value) = table[index]; + HashTable::_Link(value) = table[index]; table[index] = value; } } @@ -165,7 +165,7 @@ private: for (size_t i = 0; i < HashTable::fTableSize; i++) { ValueType *bucket = HashTable::fTable[i]; while (bucket) { - ValueType *next = _Link(bucket); + ValueType *next = HashTable::_Link(bucket); _Insert(newTable, newSize, bucket); bucket = next; } diff --git a/headers/private/shared/HashMap.h b/headers/private/shared/HashMap.h index 36b321f2b8..03c5387850 100644 --- a/headers/private/shared/HashMap.h +++ b/headers/private/shared/HashMap.h @@ -458,7 +458,7 @@ HashMap::GetIterator() const // _FindElement template -struct HashMap::Element * +typename HashMap::Element * HashMap::_FindElement(const Key& key) const { Element* element = fTable.FindFirst(key.GetHashCode()); diff --git a/src/preferences/cpufrequency/PreferencesWindow.h b/src/preferences/cpufrequency/PreferencesWindow.h index 3c3db634bb..9b33bf8f24 100644 --- a/src/preferences/cpufrequency/PreferencesWindow.h +++ b/src/preferences/cpufrequency/PreferencesWindow.h @@ -366,7 +366,7 @@ PreferencesWindow::PreferencesWindow(const char* title, template PreferencesWindow::~PreferencesWindow() { - SetWindowPosition(Frame().LeftTop()); + PreferencesStorage::SetWindowPosition(Frame().LeftTop()); }