patch for DECXX compiler detected issues (found by Kazuro FURUKAWA)

see <URL:http://www-linac.kek.jp/epics/osf/>
This commit is contained in:
Jeff Hill
2008-10-02 15:43:04 +00:00
parent ec8761185d
commit 11180d0c9c
3 changed files with 7 additions and 5 deletions

View File

@@ -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,

View File

@@ -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 <const dbr_string_t *> ( 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 <const dbr_string_t *> ( pValue ), nElem );
this->push ( static_cast < const char * > ( pValue ), nElem * MAX_STRING_SIZE );
}
void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem )

View File

@@ -149,6 +149,9 @@ private:
this->pushComBuf ( *pComBuf );
}
template < class T >
inline void push ( const T * ); // disabled
comQueSend ( const comQueSend & );
comQueSend & operator = ( const comQueSend & );
};