[LyX/master] Pass BufferParams by address
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Thu Jun 18 08:56:04 UTC 2020
commit 5aadf0879f0cb1811bb4333aecc294d408615c56
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Thu Jun 18 11:17:32 2020 +0200
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 cfa69b5..86e2432 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 70f6919..a0a86f5 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())
More information about the lyx-cvs
mailing list