From 0d487f65e9718bee33e5e74be63721a3d9513c8f Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 2 May 2009 14:52:54 +0000 Subject: [PATCH] Move using directives into the cpp files so they don't leak into apps making use of the locale kit. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30570 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/locale/DefaultCatalog.h | 12 +++++++----- src/kits/locale/DefaultCatalog.cpp | 1 + src/kits/locale/GenericNumberFormat.cpp | 6 +++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/headers/os/locale/DefaultCatalog.h b/headers/os/locale/DefaultCatalog.h index a81b6536b7..4fd8683ede 100644 --- a/headers/os/locale/DefaultCatalog.h +++ b/headers/os/locale/DefaultCatalog.h @@ -30,10 +30,6 @@ struct hash { #if __GNUC__ > 2 } // namespace __gnu_cxx - -using __gnu_cxx::hash; -using __gnu_cxx::hash_map; -using __gnu_cxx::equal_to; #endif // __GNUC__ > 2 namespace BPrivate { @@ -125,7 +121,13 @@ class DefaultCatalog : public BCatalogAddOn { int32 ComputeFingerprint() const; void UpdateAttributes(BFile& catalogFile); - typedef hash_map, equal_to > CatMap; +#if __GNUC__ > 2 + typedef __gnu_cxx::hash_map, std::equal_to > CatMap; +#else + typedef hash_map, + std::equal_to > CatMap; +#endif CatMap fCatMap; mutable BString fPath; diff --git a/src/kits/locale/DefaultCatalog.cpp b/src/kits/locale/DefaultCatalog.cpp index e9d80b4604..5d1e6387d6 100644 --- a/src/kits/locale/DefaultCatalog.cpp +++ b/src/kits/locale/DefaultCatalog.cpp @@ -24,6 +24,7 @@ #include +using __gnu_cxx::hash; using std::auto_ptr; using std::min; using std::max; diff --git a/src/kits/locale/GenericNumberFormat.cpp b/src/kits/locale/GenericNumberFormat.cpp index 6d4123ed80..bfece8e523 100644 --- a/src/kits/locale/GenericNumberFormat.cpp +++ b/src/kits/locale/GenericNumberFormat.cpp @@ -8,7 +8,11 @@ #include #include -using namespace std; +#if __GNUC__ > 2 +using std::max; +using std::min; +using std::nothrow; +#endif // constants (more below the helper classes)