errmsg: Don't create unused parameters

This commit is contained in:
Nicolas Le Cam 2009-01-19 19:50:00 +00:00
parent 3b638289f4
commit cec57b76d3
1 changed files with 4 additions and 1 deletions

View File

@ -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)