From a3393e63b83eeeeb48c40a7131200cf552b703c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Wed, 14 Nov 2007 22:29:20 +0000 Subject: [PATCH] unneeded stuff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21619 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/debug.cpp | 8 ++++---- src/support/debugstream.h | 21 --------------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/debug.cpp b/src/debug.cpp index bff728d334..e509e012ba 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -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(errorTags[i].level) << setw(13) << errorTags[i].name << " " << to_utf8(_(errorTags[i].desc)) << '\n'; diff --git a/src/support/debugstream.h b/src/support/debugstream.h index 63744ef4c5..7b5cd74299 100644 --- a/src/support/debugstream.h +++ b/src/support/debugstream.h @@ -30,25 +30,6 @@ # 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 debugstream; - //} // namespace lyx -- 2.39.5