speed up _a_lot_ switchEncoding() by avoiding an object copy

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26896 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-10-14 13:06:47 +00:00
parent a34c0a8742
commit 03ec50ac4d

View File

@ -875,7 +875,7 @@ pair<bool, int> switchEncoding(odocstream & os, BufferParams const & bparams,
OutputParams const & runparams, Encoding const & newEnc, OutputParams const & runparams, Encoding const & newEnc,
bool force) bool force)
{ {
Encoding const oldEnc = *runparams.encoding; Encoding const & oldEnc = *runparams.encoding;
bool moving_arg = runparams.moving_arg; bool moving_arg = runparams.moving_arg;
if (!force && ((bparams.inputenc != "auto" && bparams.inputenc != "default") if (!force && ((bparams.inputenc != "auto" && bparams.inputenc != "default")
|| moving_arg)) || moving_arg))