From 5aadf0879f0cb1811bb4333aecc294d408615c56 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 18 Jun 2020 11:17:32 +0200 Subject: [PATCH] Pass BufferParams by address Spotted by coverity. Note that this probably fixes a bug in getTokenValue(), where an author was added to the BufferParams copy. --- src/CutAndPaste.cpp | 2 +- src/insets/InsetTabular.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index cfa69b5b9d..86e2432947 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -602,7 +602,7 @@ Buffer * copyToTempBuffer(ParagraphList const & paragraphs, DocumentClassConstPt void putClipboard(ParagraphList const & paragraphs, DocumentClassConstPtr docclass, docstring const & plaintext, - BufferParams const bp) + BufferParams const & bp) { Buffer * buffer = copyToTempBuffer(paragraphs, docclass); if (!buffer) // already asserted in copyToTempBuffer() diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 70f691917b..a0a86f54a5 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -451,7 +451,7 @@ bool getTokenValue(string const & str, char const * token, Length & len) } -bool getTokenValue(string const & str, char const * token, Change & change, BufferParams bp) +bool getTokenValue(string const & str, char const * token, Change & change, BufferParams & bp) { // set the change to be Change() as default as this it should be if not // in the file format. @@ -574,7 +574,7 @@ string const write_attribute(string const & name, Length const & value) return value.zero() ? string() : write_attribute(name, value.asString()); } -string const write_attribute(string const & name, Change const & change, BufferParams const bp) +string const write_attribute(string const & name, Change const & change, BufferParams const & bp) { odocstringstream ods; if (change.inserted()) -- 2.39.2