[mythtv] [mythtv-commits] mythtv commit: r18315 by paulh

cal cal at graggrag.com
Mon Sep 22 06:21:29 UTC 2008

Paul Harrison wrote:
[ ... ]
> Fixed properly this time ;-)

Hmmm, I admire your persistence, but ... what you've got now is a little bit ugly, and a little bit misguided (no offence intended). The whole mythverbose mechanism is based on bits, so introducing integer arithmetic operations to manipulate it is a sure recipe for ugliness and obfuscation. 

As far as I can tell, print_verbose_messages contains just the bits of the verbosity options nominated at runtime. Subsequently ANDing print_verbose_messages with any given VB_XXX option(s) will only give a TRUE if that/those verbosity option(s) was/were nominated at runtime. Like I said, what you've got works, but 

-    if ((print_verbose_messages & VB_MEDIA+VB_EXTRA) == VB_MEDIA+VB_EXTRA)
+    if (print_verbose_messages & VB_MEDIA & VB_EXTRA)

is a whole lot cleaner, and a whole lot clearer as to what satisfies the if condition.
I'm easy, whatever you're happy with is fine :-).

cheers, Cal

More information about the mythtv-dev mailing list