[Libreoffice-commits] .: src/lib
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Dec 16 00:37:09 PST 2012
src/lib/MSPUBParser.h | 4 ++--
src/lib/MSPUBTypes.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit a74548fe38dffd8a6e8ae1fce787053a5d3be41d
Author: David Tardon <dtardon at redhat.com>
Date: Sun Dec 16 09:30:00 2012 +0100
coverity: pass structs by const ref
diff --git a/src/lib/MSPUBParser.h b/src/lib/MSPUBParser.h
index 75fc3aa..3d2b989 100644
--- a/src/lib/MSPUBParser.h
+++ b/src/lib/MSPUBParser.h
@@ -93,7 +93,7 @@ protected:
struct TextSpanReference
{
- TextSpanReference(unsigned short f, unsigned short l, CharacterStyle cs) : first(f), last(l), charStyle(cs) { }
+ TextSpanReference(unsigned short f, unsigned short l, const CharacterStyle& cs) : first(f), last(l), charStyle(cs) { }
unsigned short first;
unsigned short last;
CharacterStyle charStyle;
@@ -101,7 +101,7 @@ protected:
struct TextParagraphReference
{
- TextParagraphReference(unsigned short f, unsigned short l, ParagraphStyle ps) : first(f), last(l), paraStyle(ps) { }
+ TextParagraphReference(unsigned short f, unsigned short l, const ParagraphStyle& ps) : first(f), last(l), paraStyle(ps) { }
unsigned short first;
unsigned short last;
ParagraphStyle paraStyle;
diff --git a/src/lib/MSPUBTypes.h b/src/lib/MSPUBTypes.h
index e565f10..9e08207 100644
--- a/src/lib/MSPUBTypes.h
+++ b/src/lib/MSPUBTypes.h
@@ -168,14 +168,14 @@ struct ParagraphStyle
struct TextSpan
{
- TextSpan(std::vector<unsigned char> c, CharacterStyle s) : chars(c), style(s) { }
+ TextSpan(const std::vector<unsigned char>& c, const CharacterStyle& s) : chars(c), style(s) { }
std::vector<unsigned char> chars;
CharacterStyle style;
};
struct TextParagraph
{
- TextParagraph(std::vector<TextSpan> sp, ParagraphStyle st) : spans(sp), style(st) { }
+ TextParagraph(const std::vector<TextSpan>& sp, const ParagraphStyle& st) : spans(sp), style(st) { }
std::vector<TextSpan> spans;
ParagraphStyle style;
};
More information about the Libreoffice-commits
mailing list