From cec57b76d3522159772a10973460c069428ac4de Mon Sep 17 00:00:00 2001 From: Nicolas Le Cam Date: Mon, 19 Jan 2009 19:50:00 +0000 Subject: [PATCH] errmsg: Don't create unused parameters --- tools/errmsg.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/errmsg.cpp b/tools/errmsg.cpp index c5a6bf8fa..3852fd7e5 100644 --- a/tools/errmsg.cpp +++ b/tools/errmsg.cpp @@ -224,7 +224,10 @@ void Message::generateCode(std::ostream &ostr) const ostr << " }\n"; // Settings.. - ostr << " static bool " << _funcname << "(const Settings &s)" << std::endl; + ostr << " static bool " << _funcname << "("; + if (_settings != always && _settings != never) + ostr << "const Settings &s"; + ostr << ")" << std::endl; ostr << " {\n"; ostr << " return "; switch (_settings)