[DVDnav-discuss] Mixing of enums in dvdnav_get_next_cache_block()
Erik Hovland
erik at hovland.org
Sat Sep 1 00:17:33 CEST 2012
The struct dvdnav_vts_change_event_t has the members old_domain and
new_domain. Both are of the enum type dvd_read_domain_t. The
struct vm_position_t has a member domain of type domain_t.
dvd_read_domain_t has values of 0-3 for the enums while domain_t
has bit field values. The later is b/c those domains mean something
in the actual DVD structure.
dvdnav_get_next_cache_block does this:
vts_event->old_domain = position_current.domain
vts_event->new_domain = position_next.domain
Which means that it is assigning values to one enum variable
that have no meaning. I am starting to come around to the
idea that the type of old_domain and new_domain should
just be changed.
Does anyone have any opinion?
Thanks
E
--
Erik Hovland
erik at hovland.org
http://hovland.org/
More information about the DVDnav-discuss
mailing list