Make document_language non-mutable

The many occurances of the mutable keyword in LyX sources make it quite
difficult to understand what is really const and what not, and to debug
multithreading memory problems. In this particular case it is not needed
at all to have a mutable member, so make it non-mutable.
This commit is contained in:
Georg Baum 2014-11-18 20:51:21 +01:00
parent 2992bb04da
commit f7be88ce4c
2 changed files with 2 additions and 3 deletions

View File

@ -343,6 +343,7 @@ bool Converters::convert(Buffer const * buffer,
string() : buffer->params().bibtex_command;
runparams.index_command = (buffer->params().index_command == "default") ?
string() : buffer->params().index_command;
runparams.document_language = buffer->params().language->babel();
}
// Some converters (e.g. lilypond) can only output files to the
@ -638,8 +639,6 @@ bool Converters::runLaTeX(Buffer const & buffer, string const & command,
buffer.setBusy(true);
buffer.message(_("Running LaTeX..."));
runparams.document_language = buffer.params().language->babel();
// do the LaTeX run(s)
string const name = buffer.latexName();
LaTeX latex(command, runparams, FileName(makeAbsPath(name)),

View File

@ -113,7 +113,7 @@ public:
/** Document language babel name
*/
mutable std::string document_language;
std::string document_language;
/** The master language. Non-null only for child documents.
Note that this is not the language of the top level master, but