Try:
if ( sflag & vsp::SYM_XZ ){
sym_mod = 2;
}
Note, the single vertical bar & does bitwise and -- which is different from logical and &&.
So, this will result in the value of vsp::SYM_XZ if that bit is set in sflag. Since this value is non-zero, it will be true.
All the SYM_XX enums only have a single bit set, but if any had multiple bits set, the above code would be true if any of them matched.
If you need a more strict test -- for only exact matches in the multiple bit case, then you would want
if ( ( sflag & vsp::SYM_XZ ) == vsp::SYM_XZ )
To make sure all the bits in SYM_XZ were set in sflag.
Rob