X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fdebug.h;h=ce584db816e4c0ceb833b49b0c7ea5402371b9ec;hb=dfe1bc44b44903faf77ef454c98c4c3e56c1d5e3;hp=0dd2501c6051cd95fb384a4473cd0905ac9e26e9;hpb=863fff8fb8023aadcb1c4674b14b9b79ac7a0e58;p=features.git diff --git a/src/debug.h b/src/debug.h index 0dd2501c60..ce584db816 100644 --- a/src/debug.h +++ b/src/debug.h @@ -48,12 +48,14 @@ struct Debug { PARSER | LYXRC | KBMAP | LATEX | MATHED | FONT | TCLASS | LYXVC | LYXSERVER | ROFF); - + /// + friend inline void operator|=(Debug::type & d1, Debug::type d2); + /** A function to convert symbolic string names on debug levels to their numerical value. */ static Debug::type value(string const & val) { - int l = Debug::NONE; + type l = Debug::NONE; string v(val); while (!v.empty()) { string::size_type st = v.find(','); @@ -78,9 +80,14 @@ struct Debug { if (st == string::npos) break; v.erase(0, st + 1); } - return Debug::type(l); + return l; } }; +/// +inline void operator|=(Debug::type & d1, Debug::type d2) +{ + d1 = static_cast(d1 | d2); +} #include "support/DebugStream.h"