Hi Peter,
I don't what time we fixed this last week, because it's still
broken. It returns only half of the arguments...
Follow up mail has a patch to fix it ... hopefully for good this time
:-)
Markus
Orocos Real-Time ToolkitSmarter realtime. Safer threads
|
|
getArgumentList still broken
Hi Peter, I don't what time we fixed this last week, because it's still Follow up mail has a patch to fix it ... hopefully for good this time Markus |
[PATCH] Fix getArgumentList bug.
---
rtt/internal/OperationRepositoryPartFused.cpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/rtt/internal/OperationRepositoryPartFused.cpp b/rtt/internal/OperationRepositoryPartFused.cpp
index 9abb4ee..19bbee0 100644
--- a/rtt/internal/OperationRepositoryPartFused.cpp
+++ b/rtt/internal/OperationRepositoryPartFused.cpp
@@ -12,10 +12,11 @@ string OperationRepositoryPartHelper::description(OperationBase* op) {
vector<interface::ArgumentDescription> OperationRepositoryPartHelper::getArgumentList(OperationBase* op, const int arity, const vector<string>& arg_types ) {
vector<string> descr = op->getDescriptions();
vector<interface::ArgumentDescription> ret;
- for ( int i =1; i <= arity; i +=2 ) {
- // resize for undocumented arguments.
- descr.resize( 1 + arity *2 );
- ret.push_back(interface::ArgumentDescription(descr[i],descr[i+1], arg_types[i -1] ));
- }
+ // resize for undocumented arguments.
+ descr.resize( 1 + arity * 2 );
+
+ for ( int i=0; i < arity; i++ )
+ ret.push_back(interface::ArgumentDescription(descr[i*2+1],descr[i*2+2], arg_types[i] ));
+
return ret;
}