Hi rtt-dev list.
As i try to look for extending the number of possible arguments of methods, i see that in BindStorage.cpp, the code is not homogenous :
line 105 : bool operator()(T1& t1, T2) (t2 is not a reference) line 230 : bool operator()(T1& t1, T2& t2)
there are other case where t2 is a reference or not. I'am not certain of the importance of these types.
Could you tell me if i can ignore this ?
Thanks.
BindStorage.cpp code is not homogenous
On Tue, Apr 20, 2010 at 15:02, <paul [dot] chavent [..] ...> wrote:
> Hi rtt-dev list.
>
> As i try to look for extending the number of possible arguments of methods, i see that in BindStorage.cpp, the code is not homogenous :
>
> line 105 : bool operator()(T1& t1, T2) (t2 is not a reference)
> line 230 : bool operator()(T1& t1, T2& t2)
>
> there are other case where t2 is a reference or not. I'am not certain of the importance of these types.
>
> Could you tell me if i can ignore this ?
We can't. Fortunately, this is only used in case of commands, where
the completion condition has less arguments than the command function.
It seems that the 'unused' arguments are still copied to a temporary,
probably causing a memory allocation. So the code needs to be patched
to contain a reference everywhere.
The current workaround is to let your completion conditions have the
same number of arguments as the command, or patch BindStorage.hpp.
Thanks for spotting this.
Peter
BindStorage.cpp code is not homogenous
Hi rtt-dev list.
As i try to look for extending the number of possible arguments of methods, i see that in BindStorage.cpp, the code is not homogenous :
line 105 : bool operator()(T1& t1, T2) (t2 is not a reference)
line 230 : bool operator()(T1& t1, T2& t2)
there are other case where t2 is a reference or not. I'am not certain of the importance of these types.
Could you tell me if i can ignore this ?
In doubt, i will put a reference everywhere.
Thanks.