X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdGetVectorElement.h;h=8cc11ce50716932ea7b379161acd0ef8b72b1776;hb=560318e314802dd68405a0e11f0082e6d5fc6efb;hp=621ad34469ced668275104743167d6057a0711dd;hpb=cfad95b6e08e6e53846ffcda7fbc5932065f2c47;p=bbtk.git diff --git a/packages/std/src/bbstdGetVectorElement.h b/packages/std/src/bbstdGetVectorElement.h index 621ad34..8cc11ce 100644 --- a/packages/std/src/bbstdGetVectorElement.h +++ b/packages/std/src/bbstdGetVectorElement.h @@ -66,7 +66,7 @@ namespace bbstd BBTK_DESCRIPTION("Gets the i-th element from the input vector ("+bbtk::TypeName >()); typedef std::vector Tvector; BBTK_TEMPLATE_INPUT(GetVectorElement, In,"Input",Tvector); - BBTK_TEMPLATE_INPUT(GetVectorElement, I, "Input",int); + BBTK_TEMPLATE_INPUT(GetVectorElement, I, "iElement (default 0)",int); BBTK_TEMPLATE_INPUT(GetVectorElement, ErrorValue, "ErrorValue",T); BBTK_TEMPLATE_OUTPUT(GetVectorElement,Out,"Output",T); BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(GetVectorElement); @@ -76,7 +76,7 @@ namespace bbstd template void GetVectorElement::DoIt() { - if (( bbGetInputI() < bbGetInputIn().size() ) && ( bbGetInputI() >= 0 ) ) + if (( bbGetInputI() < (int)bbGetInputIn().size() ) && ( bbGetInputI() >= 0 ) ) { bbSetOutputOut( bbGetInputIn()[bbGetInputI()] ); } else { @@ -89,7 +89,7 @@ namespace bbstd template void GetVectorElement::bbUserSetDefaultValues() { - + bbSetInputI(0); } //================================================================= //=================================================================