Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Unified Diff: base/hash_tables.h

Issue 67056: Disable gcc 4.4 warnings about hash_map and hash_set being (Closed)
Patch Set: ifdef Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/hash_tables.h
diff --git a/base/hash_tables.h b/base/hash_tables.h
index 2764956324a32ae257d528969ea744010f04982f..5e50cfc29a7dc2dd580cb8910a96ec420df2f6a5 100644
--- a/base/hash_tables.h
+++ b/base/hash_tables.h
@@ -25,8 +25,22 @@ using stdext::hash_map;
using stdext::hash_set;
}
#elif defined(COMPILER_GCC)
+// This is a hack to disable the gcc 4.4 warning about hash_map and hash_set
+// being deprecated. We can get rid of this when we upgrade to VS2008 and we
+// can use <tr1/unordered_map> and <tr1/unordered_set>.
+#ifdef __DEPRECATED
+#define CHROME_OLD__DEPRECATED __DEPRECATED
+#undef __DEPRECATED
+#endif
+
#include <ext/hash_map>
#include <ext/hash_set>
+
+#ifdef CHROME_OLD__DEPRECATED
+#define __DEPRECATED CHROME_OLD__DEPRECATED
+#undef CHROME_OLD__DEPRECATED
+#endif
+
#include <tr1/functional>
namespace base {
using __gnu_cxx::hash_map;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698