From 3383e943c4acbd8acff8d31b85d71656b64e2450 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 6 May 2002 10:28:01 +0000 Subject: [PATCH] Avoid g++-3.1 typename warning. --- ChangeLog | 12 ++++++++++++ src/base/hash/cl_hash.h | 4 ++-- src/base/hash/cl_hash1.h | 4 ++++ src/base/hash/cl_hash2.h | 4 ++++ src/base/hash/cl_hashset.h | 4 ++++ src/base/hash/cl_hashuniq.h | 4 ++++ 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1583c01..d1dbcd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2002-05-05 Bruno Haible + + Avoid g++ 3.1 warnings. + * src/base/hash/cl_hash.h (struct cl_heap_hashtable): Use typename + where needed. + * src/base/hash/cl_hash1.h (struct cl_heap_hashtable_1): typedef + htxentry as a shortcut. + * src/base/hash/cl_hash2.h (struct cl_heap_hashtable_2): Likewise. + * src/base/hash/cl_hashset.h (struct cl_heap_hashtable_set): Likewise. + * src/base/hash/cl_hashuniq.h (struct cl_heap_hashtable_uniq): + Likewise. + 2002-03-15 Bruno Haible * cln.tex: Document problem with GNU make 3.77. diff --git a/src/base/hash/cl_hash.h b/src/base/hash/cl_hash.h index d0550d6..4b34589 100644 --- a/src/base/hash/cl_hash.h +++ b/src/base/hash/cl_hash.h @@ -154,12 +154,12 @@ struct _cl_hashtable_iterator #endif { private: - cl_heap_hashtable::htxentry * _entries; + typename cl_heap_hashtable::htxentry * _entries; long _index; public: _cl_hashtable_iterator () : _entries (0), _index (-1) {} public: /* ugh */ - _cl_hashtable_iterator (cl_heap_hashtable::htxentry * e, long i) + _cl_hashtable_iterator (typename cl_heap_hashtable::htxentry * e, long i) : _entries (e), _index (i) { do { _index--; } diff --git a/src/base/hash/cl_hash1.h b/src/base/hash/cl_hash1.h index 2bd3e7b..1cdf88b 100644 --- a/src/base/hash/cl_hash1.h +++ b/src/base/hash/cl_hash1.h @@ -31,6 +31,10 @@ struct cl_htentry1 { template struct cl_heap_hashtable_1 : public cl_heap_hashtable > { +protected: + // Abbreviation. + typedef typename cl_heap_hashtable >::htxentry htxentry; +public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. diff --git a/src/base/hash/cl_hash2.h b/src/base/hash/cl_hash2.h index 6c1ad36..73a9adc 100644 --- a/src/base/hash/cl_hash2.h +++ b/src/base/hash/cl_hash2.h @@ -29,6 +29,10 @@ struct cl_htentry2 { template struct cl_heap_hashtable_2 : public cl_heap_hashtable > { +protected: + // Abbreviation. + typedef typename cl_heap_hashtable >::htxentry htxentry; +public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. diff --git a/src/base/hash/cl_hashset.h b/src/base/hash/cl_hashset.h index a89c126..6617d47 100644 --- a/src/base/hash/cl_hashset.h +++ b/src/base/hash/cl_hashset.h @@ -22,6 +22,10 @@ struct cl_htsetentry { template struct cl_heap_hashtable_set : public cl_heap_hashtable > { +protected: + // Abbreviation. + typedef typename cl_heap_hashtable >::htxentry htxentry; +public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. diff --git a/src/base/hash/cl_hashuniq.h b/src/base/hash/cl_hashuniq.h index 52d676f..b07b38f 100644 --- a/src/base/hash/cl_hashuniq.h +++ b/src/base/hash/cl_hashuniq.h @@ -31,6 +31,10 @@ struct cl_htuniqentry { template struct cl_heap_hashtable_uniq : public cl_heap_hashtable > { +protected: + // Abbreviation. + typedef typename cl_heap_hashtable >::htxentry htxentry; +public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation.