remove redundant lyxerr.debugging checks; macro LYXERR already checks whether the output is actually needed

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17681 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2007-04-01 14:51:13 +00:00
parent 4823150780
commit ee47f918c2
6 changed files with 21 additions and 34 deletions

View 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;
}

View 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);

View 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));

View 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

View 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

View 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();