]> git.lyx.org Git - features.git/commitdiff
Pass big parameters by address
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 24 Mar 2017 14:06:13 +0000 (15:06 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 24 Mar 2017 14:11:21 +0000 (15:11 +0100)
Spotted by coverity.

src/frontends/qt4/GuiCitation.cpp
src/frontends/qt4/GuiCitation.h
src/tex2lyx/Context.cpp
src/tex2lyx/Context.h

index c1694bb539eba1e4d99eff955fd0ee8a0bfb0926..2b0f05e4396fa716563682bb3921ab146e8bba42 100644 (file)
@@ -258,7 +258,7 @@ void GuiCitation::updateControls(BiblioInfo const & bi)
 }
 
 
-void GuiCitation::updateFormatting(CitationStyle currentStyle)
+void GuiCitation::updateFormatting(CitationStyle const & currentStyle)
 {
        BufferParams const bp = documentBuffer().params();
        bool const force = currentStyle.forceUpperCase;
index 6648141fc1ce6ed8a29c0cd72c33f663a8608b6c..5a72e02dcf2e7c03e8278f382cbf8ac3306141e5 100644 (file)
@@ -105,7 +105,7 @@ private:
        /// set the styles combo
        void updateStyles(BiblioInfo const & bi);
        /// set the formatting widgets
-       void updateFormatting(CitationStyle currentStyle);
+       void updateFormatting(CitationStyle const & currentStyle);
        ///
        void updateControls(BiblioInfo const & bi);
        /// Set the appropriate hinting text on the filter bar
index 2f49a071f5f663dd5df3b3a108cafaefe0e5225c..5a04cde46e0ff3db76078bcca41bcd3bc8760309 100644 (file)
@@ -78,7 +78,7 @@ bool Context::empty = true;
 Context::Context(bool need_layout_,
                 TeX2LyXDocClass const & textclass_,
                 Layout const * layout_, Layout const * parent_layout_,
-                TeXFont font_)
+                TeXFont const & font_)
        : need_layout(need_layout_),
          need_end_layout(false), need_end_deeper(false),
          has_item(false), deeper_paragraph(false),
index ad95f02b0b8bd374be5b90532146e9faeb2f468f..b88a921f33e6c0ac8466e6912cd56c18d8bf5aa0 100644 (file)
@@ -82,7 +82,7 @@ public:
                TeX2LyXDocClass const & textclass_,
                Layout const * layout_ = 0,
                Layout const * parent_layout_= 0,
-               TeXFont font_ = TeXFont());
+               TeXFont const & font_ = normalfont);
        ~Context();
 
        /// Output a \\begin_layout if requested