]> git.lyx.org Git - features.git/commitdiff
unneeded stuff
authorAndré Pönitz <poenitz@gmx.net>
Wed, 14 Nov 2007 22:29:20 +0000 (22:29 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 14 Nov 2007 22:29:20 +0000 (22:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21619 a592a061-630c-0410-9148-cb99ea01b6c8

src/debug.cpp
src/support/debugstream.h

index bff728d33482c8df5ae371c5542b24798026fd6c..e509e012baf8f4051ea111efd52cebb074b8d74a 100644 (file)
@@ -80,9 +80,9 @@ int const numErrorTags = sizeof(errorTags)/sizeof(error_item);
 lyx_debug_trait::type lyx_debug_trait::value(string const & val)
 {
        type l = Debug::NONE;
-       string v(val);
+       string v = val;
        while (!v.empty()) {
-               string::size_type const st = v.find(',');
+               size_t const st = v.find(',');
                string const tmp(ascii_lowercase(v.substr(0, st)));
                if (tmp.empty())
                        break;
@@ -106,7 +106,7 @@ lyx_debug_trait::type lyx_debug_trait::value(string const & val)
 void lyx_debug_trait::showLevel(ostream & os, lyx_debug_trait::type level)
 {
        // Show what features are traced
-       for (int i = 0; i < numErrorTags ; ++i) {
+       for (int i = 0; i != numErrorTags; ++i) {
                if (errorTags[i].level != Debug::ANY
                    && errorTags[i].level != Debug::NONE
                    && errorTags[i].level & level) {
@@ -123,7 +123,7 @@ void lyx_debug_trait::showLevel(ostream & os, lyx_debug_trait::type level)
 
 void lyx_debug_trait::showTags(ostream & os)
 {
-       for (int i = 0; i < numErrorTags ; ++i)
+       for (int i = 0; i != numErrorTags ; ++i)
                os << setw(10) << static_cast<unsigned int>(errorTags[i].level)
                   << setw(13) << errorTags[i].name
                   << "  " << to_utf8(_(errorTags[i].desc)) << '\n';
index 63744ef4c5014c87bf003dc192211a31ec180db7..7b5cd7429979846e8d5df9edd4d864718c1743c9 100644 (file)
 # undef DEBUG
 #endif
 
-struct debug_trait {
-       enum type {
-               NONE   = 0,
-               EMERG  = 1,
-               ALERT  = 2,
-               CRIT   = 3,
-               ERR    = 4,
-               WARN   = 5,
-               NOTICE = 6,
-               INFO   = 7,
-               DEBUG  = 8,
-               ANY = 0xffffff
-       };
-
-       static bool match(type a, type b) {
-               return (b <= a || (b == ANY && a > NONE));
-       }
-};
-
 #ifdef TEMPORARY_DEBUG_MACRO
 # define DEBUG TEMPORARY_DEBUG_MACRO
 # undef TEMPORARY_DEBUG_MACRO
@@ -129,8 +110,6 @@ private:
        bool enabled_;
 };
 
-typedef basic_debugstream<debug_trait> debugstream;
-
 
 //} // namespace lyx