Re: [Dbus-cxx-devel] Patch to support vector of structures
Status: Beta
Brought to you by:
rvinyard
|
From: Rick L. V. Jr. <rvi...@cs...> - 2010-01-04 16:03:22
|
Tyler Conant wrote:
> 1. This is a diff against 0.5.0. The sub iter was not being set to NULL
> during the deletion of the iter when closing the container. This was
> causing an access error when creating a second child container.
>
I just pushed out 0.5.1 that fixes this bug. Thanks again for hunting this
one down.
> 2. To support structures the << operator is overloaded, but this did not
> help with a vector of structures since the append operator was called on
> the child iter, instead of the << operator. This change doesn't appear to
> have any side effects, but I'm new to dbus-cxx and have yet to walk
> through the entire code base.
>
- m_subiter->append( v[i] );
-
+ //m_subiter->append( v[i] );
+ *m_subiter << v[i];
This one I'm not too clear on. I'm wondering if there is also something
else going on.
The overloaded << operator is very thin and is essentially:
this->append( v );
As a result,
m_subiter->append(v[i]);
and
*m_subiter << v[i];
should be equivalent unless there is something subtle going on in the
resolution.
---
Rick
|