]> git.lyx.org Git - lyx.git/commitdiff
remove redundant lyxerr.debugging checks; macro LYXERR already checks whether the...
authorMichael Schmitt <michael.schmitt@teststep.org>
Sun, 1 Apr 2007 14:51:13 +0000 (14:51 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Sun, 1 Apr 2007 14:51:13 +0000 (14:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17681 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/insetcommandparams.C
src/kbmap.C
src/lyx_main.C
src/lyxfunc.C
src/rowpainter.C
src/text.C

index bd0c208ef2a7603e4dbc9bb076e96821eb204fe7..713ad3c67394154ca05c3dd3537fbd4f50664366 100644 (file)
@@ -243,13 +243,12 @@ void InsetCommandParams::scanCommand(string const & cmd)
        if (!tsecoptions.empty())  setSecOptions(tsecoptions);
        if (!tcontents.empty()) setContents(tcontents);
 
-       if (lyxerr.debugging(Debug::PARSER))
-               lyxerr << "Command <" <<  cmd
-                      << "> == <" << to_utf8(getCommand())
-                      << "> == <" << getCmdName()
-                      << '|' << getContents()
-                      << '|' << getOptions()
-                      << '|' << getSecOptions() << '>' << endl;
+       LYXERR(Debug::PARSER) << "Command <" <<  cmd
+               << "> == <" << to_utf8(getCommand())
+               << "> == <" << getCmdName()
+               << '|' << getContents()
+               << '|' << getOptions()
+               << '|' << getSecOptions() << '>' << endl;
 }
 
 
index fd6b8985074f036e511663e241521db818f94a9a..a9d1460c85f2ed0207586e3b1ba6187b3e4aa8be 100644 (file)
@@ -57,11 +57,9 @@ string const kb_keymap::printKeySym(LyXKeySym const & key,
 
 string::size_type kb_keymap::bind(string const & seq, FuncRequest const & func)
 {
-       if (lyxerr.debugging(Debug::KBMAP)) {
-               lyxerr << "BIND: Sequence `"
-                      << seq << "' Action `"
-                      << func.action << '\'' << endl;
-       }
+       LYXERR(Debug::KBMAP) << "BIND: Sequence `"
+              << seq << "' Action `"
+              << func.action << '\'' << endl;
 
        kb_sequence k(0, 0);
 
index da1f55762927c6874b5235e8a70b9016ccc9aedf..c22e4c14ba72f736edbfaf662ad12280248fa217 100644 (file)
@@ -923,9 +923,7 @@ bool LyX::init()
                return false;
        }
 
-       if (lyxerr.debugging(Debug::INIT)) {
-               lyxerr << "LyX tmp dir: `" << package().temp_dir() << '\'' << endl;
-       }
+       LYXERR(Debug::INIT) << "LyX tmp dir: `" << package().temp_dir() << '\'' << endl;
 
        LYXERR(Debug::INIT) << "Reading session information '.lyx/session'..." << endl;
        pimpl_->session_.reset(new Session(lyxrc.num_lastfiles));
index 5b5c3f39120c7162c16e43153c6923ac49930d2c..33d3ef2cb45d228a258ea510c5424be469629b0b 100644 (file)
@@ -324,13 +324,11 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
                func = FuncRequest(LFUN_COMMAND_PREFIX);
        }
 
-       if (lyxerr.debugging(Debug::KEY)) {
-               lyxerr << BOOST_CURRENT_FUNCTION
-                      << " Key [action="
-                      << func.action << "]["
-                      << to_utf8(keyseq->print(false)) << ']'
-                      << endl;
-       }
+       LYXERR(Debug::KEY) << BOOST_CURRENT_FUNCTION
+              << " Key [action="
+              << func.action << "]["
+              << to_utf8(keyseq->print(false)) << ']'
+              << endl;
 
        // already here we know if it any point in going further
        // why not return already here if action == -1 and
index ca35c85e319d70f3842f45f9b6241390f0b68ab4..af58063cc79256960c9e75f82bd0c29bde3e0941 100644 (file)
@@ -191,9 +191,7 @@ void RowPainter::paintInset(pos_type const pos, LyXFont const & font)
        bool tmp = refreshInside;
        if (!in || !in->wide()) {
                refreshInside = true;
-               if (lyxerr.debugging(Debug::PAINTING)) { 
-                       lyxerr << endl << "Paint inset fully" << endl;
-               }
+               LYXERR(Debug::PAINTING) << endl << "Paint inset fully" << endl;
        }
        if (refreshInside)
                inset->drawSelection(pi, int(x_), yo_);
@@ -977,9 +975,7 @@ void paintPar
        // Re-enable screen drawing for future use of the painter.
        pi.pain.setDrawingEnabled(true);
 
-       if (lyxerr.debugging(Debug::PAINTING)) {
-               LYXERR(Debug::PAINTING) << "." << endl;
-       }
+       LYXERR(Debug::PAINTING) << "." << endl;
 }
 
 } // namespace anon
index 6e3c35ce3ef55fef0c3f58a1d7f0ccec039d3b26..80cf983ff39e97c1afa34561b67ad8d1889cfe02 100644 (file)
@@ -1366,12 +1366,10 @@ void LyXText::drawSelection(PainterInfo & pi, int x, int) const
        if (!ptr_cmp(cur.text(), this))
                return;
 
-       if (lyxerr.debugging(Debug::DEBUG)) {
-               LYXERR(Debug::DEBUG)
-                       << BOOST_CURRENT_FUNCTION
-                       << "draw selection at " << x
-                       << endl;
-       }
+       LYXERR(Debug::DEBUG)
+               << BOOST_CURRENT_FUNCTION
+               << "draw selection at " << x
+               << endl;
 
        DocIterator beg = cur.selectionBegin();
        DocIterator end = cur.selectionEnd();