X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Fdebug.h;h=f6b06d5c3eeb24e61b39389c7ef54699cc5d803a;hb=279e656d6a7c4ee3647752cba8b9aa7d6ec6e0c2;hp=a4887db7ae72573f07c588f25d4ae13536e904fa;hpb=07afd76b7c3560b53ad1377812a7a5f30696d163;p=lyx.git diff --git a/src/support/debug.h b/src/support/debug.h index a4887db7ae..f6b06d5c3e 100644 --- a/src/support/debug.h +++ b/src/support/debug.h @@ -20,7 +20,7 @@ // Forward definitions do not work with libc++ // but ios_base has already been defined in strfwd // if compiling with it -#ifndef _LIBCPP_VERSION +#ifndef USE_LLVM_LIBCPP namespace std { class ios_base; @@ -28,7 +28,7 @@ class ios_base; template class basic_streambuf; typedef basic_streambuf > streambuf; -} +} // namespace std #endif @@ -81,7 +81,7 @@ namespace Debug { /// WORKAREA = (1 << 19), /// - INSETTEXT = (1 << 20), + CLIPBOARD = (1 << 20), /// GRAPHICS = (1 << 21), /// change tracking @@ -110,7 +110,7 @@ namespace Debug { /// Return number of levels int levelCount(); - + /// A function to convert debug level string names numerical values Type value(std::string const & val); @@ -142,8 +142,9 @@ inline void operator|=(Debug::Type & d1, Debug::Type d2) class LyXErr { public: - LyXErr(): enabled_(true), second_enabled_(false) {} - + LyXErr(): dt_(Debug::NONE), stream_(0), enabled_(true), + second_stream_(0), second_enabled_(false) {} + /// Disable the stream completely void disable(); /// Enable the stream after a possible call of disable() @@ -164,7 +165,7 @@ public: /// Returns second stream std::ostream & secondStream() { return *second_stream_; } /// Sets second stream - void setSecondStream(std::ostream * os) + void setSecondStream(std::ostream * os) { second_enabled_ = (second_stream_ = os); } /// Is the second stream is enabled? bool secondEnabled() { return second_enabled_; } @@ -201,6 +202,10 @@ LyXErr & operator<<(LyXErr &, int); LyXErr & operator<<(LyXErr &, unsigned int); LyXErr & operator<<(LyXErr &, long); LyXErr & operator<<(LyXErr &, unsigned long); +#ifdef LYX_USE_LONG_LONG +LyXErr & operator<<(LyXErr &, long long); +LyXErr & operator<<(LyXErr &, unsigned long long); +#endif LyXErr & operator<<(LyXErr &, double); LyXErr & operator<<(LyXErr &, std::string const &); LyXErr & operator<<(LyXErr &, docstring const &);