mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
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:
parent
2992bb04da
commit
f7be88ce4c
@ -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)),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user