summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-17 17:00:45 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-17 17:00:45 +0000
commitf021aa85f8dc81ba11a566072412a937128d1b77 (patch)
treefed6f8161f589d6ab2dc388af7efd0e3898a5a93 /TAO
parent6f60efec8644e9d14ff9722f24f8ea0457178829 (diff)
downloadATCD-f021aa85f8dc81ba11a566072412a937128d1b77.tar.gz
More appeasements to SunCC4.x.
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tao/Sequence_T.cpp14
-rw-r--r--TAO/tao/Sequence_T.i20
2 files changed, 34 insertions, 0 deletions
diff --git a/TAO/tao/Sequence_T.cpp b/TAO/tao/Sequence_T.cpp
index 87472b2489e..80bf414c61f 100644
--- a/TAO/tao/Sequence_T.cpp
+++ b/TAO/tao/Sequence_T.cpp
@@ -1051,8 +1051,12 @@ operator= (const TAO_Unbounded_Array_Sequence<T, T_var> &rhs)
if (this->maximum_ < rhs.maximum_)
{
// free the old buffer
+#if defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x500)
+ T *tmp = (T *) this->buffer_;
+#else /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
T *tmp = ACE_reinterpret_cast (T *,
this->buffer_);
+#endif /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
TAO_Unbounded_Array_Sequence<T, T_var>::freebuf (tmp);
@@ -1070,10 +1074,15 @@ operator= (const TAO_Unbounded_Array_Sequence<T, T_var> &rhs)
for (CORBA::ULong i = 0; i < rhs.length_; ++i)
{
+#if defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x500)
+ T_var::copy (((T *) this->buffer_)[i],
+ ((const T *) rhs.buffer_)[i]);
+#else /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
T_var::copy (ACE_reinterpret_cast (T *,
this->buffer_)[i],
ACE_reinterpret_cast (const T *,
rhs.buffer_)[i]);
+#endif /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
}
return *this;
@@ -1175,10 +1184,15 @@ TAO_Bounded_Array_Sequence<T, T_var, MAX>::operator=
for (CORBA::ULong i = 0; i < rhs.length_; ++i)
{
+#if defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x500)
+ T_var::copy (((T *) this->buffer_)[i],
+ ((const T *) rhs.buffer_)[i]);
+#else /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
T_var::copy (ACE_reinterpret_cast (T *,
this->buffer_)[i],
ACE_reinterpret_cast (const T *,
rhs.buffer_)[i]);
+#endif /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
}
return *this;
diff --git a/TAO/tao/Sequence_T.i b/TAO/tao/Sequence_T.i
index 93f021b6964..e5bc3af344d 100644
--- a/TAO/tao/Sequence_T.i
+++ b/TAO/tao/Sequence_T.i
@@ -491,14 +491,24 @@ template <class T, class T_var> ACE_INLINE T &
TAO_Unbounded_Array_Sequence<T, T_var>::operator[] (CORBA::ULong i)
{
ACE_ASSERT (i < this->maximum_);
+
+#if defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x500)
+ return ((T*) this->buffer_)[i];
+#else /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
return (ACE_reinterpret_cast (T*, this->buffer_))[i];
+#endif /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
}
template <class T, class T_var> ACE_INLINE const T &
TAO_Unbounded_Array_Sequence<T, T_var>::operator[] (CORBA::ULong i) const
{
ACE_ASSERT (i < this->maximum_);
+
+#if defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x500)
+ return ((const T* ACE_CAST_CONST) this->buffer_)[i];
+#else /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
return (ACE_reinterpret_cast (const T* ACE_CAST_CONST, this->buffer_))[i];
+#endif /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
}
template <class T, class T_var> ACE_INLINE T *
@@ -609,14 +619,24 @@ template <class T, class T_var, size_t MAX> ACE_INLINE T &
TAO_Bounded_Array_Sequence<T, T_var, MAX>::operator[] (CORBA::ULong i)
{
ACE_ASSERT (i < this->maximum_);
+
+#if defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x500)
+ return ((T*) this->buffer_)[i];
+#else /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
return (ACE_reinterpret_cast (T*, this->buffer_))[i];
+#endif /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
}
template <class T, class T_var, size_t MAX> ACE_INLINE const T &
TAO_Bounded_Array_Sequence<T, T_var, MAX>::operator[] (CORBA::ULong i) const
{
ACE_ASSERT (i < this->maximum_);
+
+#if defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x500)
+ return ((const T* ACE_CAST_CONST) this->buffer_)[i];
+#else /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
return (ACE_reinterpret_cast (const T* ACE_CAST_CONST, this->buffer_))[i];
+#endif /* (__SUNPRO_CC) && (__SUNPRO_CC < 0x500) */
}
template <class T, class T_var, size_t MAX> ACE_INLINE T *