commit f7be88ce4c2bbc10c4691e614a54fca427a2e8fb
Author: Georg Baum <[email protected]>
Date:   Tue Nov 18 20:51:21 2014 +0100

    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.

diff --git a/src/Converter.cpp b/src/Converter.cpp
index 8085b15..eca6a4e 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 87d8fcd..f01c5b9 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

Reply via email to