summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-99b6
-rw-r--r--ace/Functor.h49
-rw-r--r--ace/Functor.i23
3 files changed, 27 insertions, 51 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index bed060f8a1a..3c78e49c8df 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -1,3 +1,9 @@
+Tue Jun 8 20:46:05 1999 Matthew J Braun <mjb2@cs.wustl.edu>
+
+ * ace/Functor.i,h:
+ Migrated ACE_Hash template specializations to the ace type
+ wrappers (ACE_UINT16, etc).
+
Tue Jun 8 15:47:06 1999 Douglas C. Schmidt <schmidt@danzon.cs.wustl.edu>
* ace: Updated most of the places in ACE that can benefit from the
diff --git a/ace/Functor.h b/ace/Functor.h
index a66788ab876..c119b86a493 100644
--- a/ace/Functor.h
+++ b/ace/Functor.h
@@ -115,77 +115,60 @@ public:
// Simply returns t
};
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<short>
-{
- // = TITLE
- // Function object for hashing a short
-public:
- u_long operator () (short t) const;
- // Simply returns t
-};
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<unsigned short>
-{
- // = TITLE
- // Function object for hashing an unsigned short
-public:
- u_long operator () (unsigned short t) const;
- // Simply returns t
-};
+// @@ ADD HASHES FOR ACE TYPES
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<int>
+class ACE_Export ACE_Hash<ACE_INT16>
{
// = TITLE
- // Function object for hashing an int
+ // Function object for hashing a 16-bit signed number
public:
- u_long operator () (int t) const;
+ u_long operator () (ACE_INT16 t) const;
// Simply returns t
};
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<unsigned int>
+class ACE_Export ACE_Hash<ACE_UINT16>
{
// = TITLE
- // Function object for hashing an unsigned int
+ // Function object for hashing a 16-bit unsigned number
public:
- u_long operator () (unsigned int t) const;
+ u_long operator () (ACE_UINT16 t) const;
// Simply returns t
};
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<long>
+class ACE_Export ACE_Hash<ACE_INT32>
{
// = TITLE
- // Function object for hashing a long
+ // Function object for hashing a 32-bit signed number
public:
- u_long operator () (long t) const;
+ u_long operator () (ACE_INT32 t) const;
// Simply returns t
};
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<unsigned long>
+class ACE_Export ACE_Hash<ACE_UINT32>
{
// = TITLE
- // Function object for hashing an unsigned long
+ // Function object for hashing a 32-bit unsigned number
public:
- u_long operator () (unsigned long t) const;
+ u_long operator () (ACE_UINT32 t) const;
// Simply returns t
};
-#if ACE_SIZEOF_LONG != 8
ACE_TEMPLATE_SPECIALIZATION
class ACE_Export ACE_Hash<ACE_UINT64>
{
// = TITLE
- // Function object for hashing an unsigned long
+ // Function object for hashing a 64-bit unsigned number
public:
u_long operator () (ACE_UINT64 t) const;
// Simply returns t
};
-#endif /* ACE_SIZEOF_LONG != 8 */
+
+// @@ DONE ADDING HASHES FOR ACE TYPES
ACE_TEMPLATE_SPECIALIZATION
class ACE_Export ACE_Hash<const char *>
diff --git a/ace/Functor.i b/ace/Functor.i
index 8703043412a..abb2ca799a7 100644
--- a/ace/Functor.i
+++ b/ace/Functor.i
@@ -70,48 +70,35 @@ ACE_Hash<unsigned char>::operator () (unsigned char t) const
}
ACE_INLINE u_long
-ACE_Hash<short>::operator () (short t) const
+ACE_Hash<ACE_INT16>::operator () (ACE_INT16 t) const
{
return t;
}
ACE_INLINE u_long
-ACE_Hash<unsigned short>::operator () (unsigned short t) const
+ACE_Hash<ACE_UINT16>::operator () (ACE_UINT16 t) const
{
return t;
}
ACE_INLINE u_long
-ACE_Hash<int>::operator () (int t) const
+ACE_Hash<ACE_INT32>::operator () (ACE_INT32 t) const
{
return t;
}
ACE_INLINE u_long
-ACE_Hash<unsigned int>::operator () (unsigned int t) const
+ACE_Hash<ACE_UINT32>::operator () (ACE_UINT32 t) const
{
return t;
}
ACE_INLINE u_long
-ACE_Hash<long>::operator () (long t) const
-{
- return t;
-}
-
-ACE_INLINE u_long
-ACE_Hash<unsigned long>::operator () (unsigned long t) const
-{
- return t;
-}
-
-#if ACE_SIZEOF_LONG != 8
-ACE_INLINE u_long
ACE_Hash<ACE_UINT64>::operator () (ACE_UINT64 t) const
{
return ACE_U64_TO_U32 (t);
}
-#endif /* ACE_SIZEOF_LONG != 8 */
+
ACE_INLINE u_long
ACE_Hash<const char *>::operator () (const char *t) const