[orbitcpp-list] a patch for orbitcpp_sequence.hh
Status: Beta
Brought to you by:
philipd
From: Laszlo M. <las...@et...> - 2001-05-11 10:59:43
|
Hi, I've found a bug in SequenceBase(SequenceBase const &src) in case of src.m_target._maximum == 0. A similar problem is already corrected for op= in the cvs, now here is my fix for the copy ctor. In the second hunk I removed an unused variable which greatly reduced the warning noise. bye,Laszlo ps: apply this using "patch -l" --- orbitcpp_sequence.hh.orig Fri May 11 12:12:17 2001 +++ orbitcpp_sequence.hh Fri May 11 12:24:42 2001 @@ -66,8 +66,10 @@ SequenceBase(SequenceBase const &src) { m_target = src.m_target; + if (m_target._maximum) { m_target._buffer = SEQ::allocbuf(m_target._maximum); if (!m_target._buffer) throw CORBA::NO_MEMORY(); + } try { for (CORBA::ULong i = 0;i<m_target._length;i++) @@ -247,7 +253,7 @@ #define ORBITCPP_DECLARE_SIMPLE_SEQUENCE(COMPONENT,ALLOC_FUNC,ALLOCBUF_FUNC,C_NAME,NAME) \ typedef _orbitcpp::UnboundedSequenceTmpl< COMPONENT,C_NAME> NAME; \ - inline void *NAME::operator new(CORBA::ULong size) { \ + inline void *NAME::operator new(CORBA::ULong) { \ return ALLOC_FUNC(); \ } \ inline void NAME::operator delete(void *seq) { \ |