Each VNC feature enum entry has a corresponding _MASK constant
which is the bit-shifted value. It is very easy for contributors
to accidentally use the _MASK constant, instead of the non-_MASK
constant, or the reverse. No compiler warning is possible and
it'll just silently do the wrong thing at runtime.
By introducing the vnc_set_feature helper method, we can drop
all the _MASK constants and thus prevent any future accidents.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
ui/vnc.c | 34 +++++++++++++++++-----------------
ui/vnc.h | 21 ++++-----------------
2 files changed, 21 insertions(+), 34 deletions(-)