hi,
i want to compare two int array's with the == operator, which i got returned from DSL_node::Parents(), I know that they got euqal parents, but the comparison doesn't say so. When i iterate over the intArray from 0, to DSL_intArray::NumItems() it behaves like expected, so now my question could it be that the == operator allways compares the vector version? Or what's wrong with my usage. Again the intArrays were returned from DSL_node::Parents() and i didn't modify anything.
Thanks in advance,
nordic
equal operator for intArray
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: equal operator for intArray
Unfortunately, the DSL_intArray::noperator== is broken. This is related to really old issue; I suggest that you write your own function iterating over elements from 0 to NumItems() - 1.
Re: equal operator for intArray
Ahh, ok...
Thanks for the quick request, just like allways
Thanks for the quick request, just like allways
Re: equal operator for intArray
Am i right, with the assumption that the equaloperator is fully functional for every other array class, like for example DSL_doubleArray?
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: equal operator for intArray
Unfortunately, the issue with operator= is related to fundamental problem with DSL_xxxArray classes (the possibility of different returns from NumItems() and GetSize()).nordic wrote:Am i right, with the assumption that the equaloperator is fully functional for every other array class, like for example DSL_doubleArray?
What are the sources of DSL_doubleArrays you want to compare? Do they come from node definitons or values?
Re: equal operator for intArray
ok, then i just iterate over the arrays by myself... I'm using it in my unit-tests, so principal they could come from anywhere =)..
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: equal operator for intArray
That's the core of the problem with DSL_xxxArray object coming from anywhere - you won't be able to decide between NumItems() and GetSize() when choosing the iteration count.nordic wrote:ok, then i just iterate over the arrays by myself... I'm using it in my unit-tests, so principal they could come from anywhere =)..