Page MenuHomePhabricator

efl_composite_model: make sure we are having a cmp method that works
Needs ReviewPublic

Authored by bu5hm4n on Wed, Sep 4, 8:08 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

(uint) - (int) results in the type uint. which ... cannot get negative,
so this compare function will always tell you either 0 or > 0.

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 13115
bu5hm4n created this revision.Wed, Sep 4, 8:08 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

bu5hm4n requested review of this revision.Wed, Sep 4, 8:08 AM
segfaultxavi added inline comments.
src/lib/ecore/efl_composite_model.c
45

If we do not expect node->index to be greater than 2^31 we can shorten this to return (int)node->index - *key, no?

cedric added inline comments.Wed, Sep 4, 6:40 PM
src/lib/ecore/efl_composite_model.c
45

There has been no review of what an index range is in mvvm and it would be a good things to do. Make a decision and make sure all our API follow it.