]> git.lyx.org Git - features.git/commitdiff
Pass BufferParams by address
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 09:17:32 +0000 (11:17 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 09:17:32 +0000 (11:17 +0200)
Spotted by coverity.

Note that this probably fixes a bug in getTokenValue(), where an author
was added to the BufferParams copy.

src/CutAndPaste.cpp
src/insets/InsetTabular.cpp

index cfa69b5b9d8a86ac6f6eea9ffc92a3d9353e6cd0..86e2432947d601435c744415e29589e58c0aa2b3 100644 (file)
@@ -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()
index 70f691917b8a6ce26e94cf45de9325c219b80f4e..a0a86f54a5a8986c4aa04d45d90e5910c6a85246 100644 (file)
@@ -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())