From e0538043e45d086d38bc94e1a57a894ed5abf2cc Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Mon, 14 Jan 2008 21:52:57 +0000 Subject: [PATCH] * Nearly a proof that there are useful compiler warnings that a variable is not used, though in this case the warning was "fixed" before it did its job. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22561 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 2 +- src/mathed/MathMacroTemplate.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 9003a49a95..0fff4f4157 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -2076,7 +2076,7 @@ void Buffer::writeParentMacros(odocstream & os) const MacroData const * data = d->parent_buffer->getMacro(*it, *this, false); if (data) - data->write(os, true); + data->write(os, true); } } diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index 85301fbfe0..b7ecb9bbc5 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -970,13 +970,13 @@ void MathMacroTemplate::write(WriteStream & os) const } -void MathMacroTemplate::write(WriteStream & os, bool /*overwriteRedefinition*/) const +void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) const { // newcommand or renewcommand if (os.latex() && optionals_ > 1) os << "\\newlyxcommand"; else { - if (redefinition_) + if (redefinition_ && !overwriteRedefinition) os << "\\renewcommand"; else os << "\\newcommand";