On 11/28/2014 02:42 PM, Bill Fischofer wrote:
Not really.  int has been used for booleans for some time and the 0 =
false, 1 = true convention is well established.  The purpose of enums is
to support remapping.  Under no circumstances would one expect to see
some platform define ODP_TRUE to be anything other than 1 or ODP_FALSE
to be anything other than 0.  So in this case an enum is just adding
syntactic clutter for no benefit.

In this case purpose of enums is not remapping, but value validation.

In different parts of our specification we have true = 1 or true = !0.
So it is not clear if '2' can be passed as 'true' to a function that had odp_bool_t argument. If true is exactly 1, then it would be more
clear to see ODP_TRUE as input value.

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to