From f7be88ce4c2bbc10c4691e614a54fca427a2e8fb Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Tue, 18 Nov 2014 20:51:21 +0100 Subject: [PATCH] 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. --- src/Converter.cpp | 3 +-- src/OutputParams.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Converter.cpp b/src/Converter.cpp index 8085b15a85..eca6a4e178 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -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)), diff --git a/src/OutputParams.h b/src/OutputParams.h index 87d8fcd122..f01c5b96b4 100644 --- a/src/OutputParams.h +++ b/src/OutputParams.h @@ -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