summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-08-05 05:17:34 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-08-05 05:17:34 +0000
commitfbbeb94770166aafd6f181b8d14e29bd3a47752a (patch)
treef40f58011395663b8a12964c042f2779a5a8b562
parent2ce2b825d87887423c7ebe0ab5595a5bc9834ff5 (diff)
downloadATCD-fbbeb94770166aafd6f181b8d14e29bd3a47752a.tar.gz
ChangeLogTag:Thu Aug 5 00:15:45 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
-rw-r--r--ChangeLog-99b7
-rw-r--r--ace/Based_Pointer_T.h4
-rw-r--r--ace/Based_Pointer_T.i4
3 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index 49ff340614b..b625c483038 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -1,3 +1,10 @@
+Thu Aug 5 00:15:45 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Based_Pointer_T: Changed the type of index for operator[]
+ and operator+= to be int instead of long so that it'll work
+ correctly when constant values are used. Thanks to
+ Nanbor and KCC for pointing this out!
+
Wed Aug 4 19:46:33 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
* tests/run_tests.sh:
diff --git a/ace/Based_Pointer_T.h b/ace/Based_Pointer_T.h
index 3306016b8c3..c25bacb69a3 100644
--- a/ace/Based_Pointer_T.h
+++ b/ace/Based_Pointer_T.h
@@ -106,10 +106,10 @@ public:
int operator != (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
// Inequality operator.
- CONCRETE operator [](long index) const;
+ CONCRETE operator [](int index) const;
// Subscript operator.
- void operator+= (long index);
+ void operator+= (int index);
// Increment operator.
operator CONCRETE *() const;
diff --git a/ace/Based_Pointer_T.i b/ace/Based_Pointer_T.i
index 07ce496a908..a557c558081 100644
--- a/ace/Based_Pointer_T.i
+++ b/ace/Based_Pointer_T.i
@@ -63,7 +63,7 @@ ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE *() const
}
template <class CONCRETE> ACE_INLINE CONCRETE
-ACE_Based_Pointer_Basic<CONCRETE>::operator [] (long index) const
+ACE_Based_Pointer_Basic<CONCRETE>::operator [] (int index) const
{
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator[]");
CONCRETE *c = ACE_reinterpret_cast (CONCRETE *,
@@ -72,7 +72,7 @@ ACE_Based_Pointer_Basic<CONCRETE>::operator [] (long index) const
}
template <class CONCRETE> ACE_INLINE void
-ACE_Based_Pointer_Basic<CONCRETE>::operator += (long index)
+ACE_Based_Pointer_Basic<CONCRETE>::operator += (int index)
{
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator+=");
this->base_offset_ += (index * sizeof (CONCRETE));