diff --git a/src/ca/comBuf.h b/src/ca/comBuf.h index dee58e542..2f6c6faa1 100644 --- a/src/ca/comBuf.h +++ b/src/ca/comBuf.h @@ -116,6 +116,8 @@ private: epicsUInt8 buf [ comBufSize ]; void * operator new ( size_t size ); void operator delete ( void * ); + template < class T > + bool push ( const T * ); // disabled }; inline void * comBuf::operator new ( size_t size, diff --git a/src/ca/comQueSend.cpp b/src/ca/comQueSend.cpp index 4a29b4db5..5ae150be2 100644 --- a/src/ca/comQueSend.cpp +++ b/src/ca/comQueSend.cpp @@ -106,10 +106,7 @@ void comQueSend::clear () void comQueSend::copy_dbr_string ( const void * pValue ) { - // this extra step is required by Borland BCC 5.5 - const dbr_string_t & str = - * static_cast ( pValue ); - this->push ( str ); + this->push ( static_cast < const char * > ( pValue ), MAX_STRING_SIZE ); } void comQueSend::copy_dbr_short ( const void * pValue ) @@ -186,7 +183,7 @@ const comQueSend::copyScalarFunc_t comQueSend::dbrCopyScalar [39] = { void comQueSend::copy_dbr_string ( const void *pValue, unsigned nElem ) { - this->push ( static_cast ( pValue ), nElem ); + this->push ( static_cast < const char * > ( pValue ), nElem * MAX_STRING_SIZE ); } void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem ) diff --git a/src/ca/comQueSend.h b/src/ca/comQueSend.h index 721a19b7f..c1be89440 100644 --- a/src/ca/comQueSend.h +++ b/src/ca/comQueSend.h @@ -149,6 +149,9 @@ private: this->pushComBuf ( *pComBuf ); } + template < class T > + inline void push ( const T * ); // disabled + comQueSend ( const comQueSend & ); comQueSend & operator = ( const comQueSend & ); };