summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-12-16 09:30:00 +0100
committerDavid Tardon <dtardon@redhat.com>2012-12-16 09:30:00 +0100
commita74548fe38dffd8a6e8ae1fce787053a5d3be41d (patch)
treeef6df216cbc052b9e1a241018a4989fd5c2048d9
parent3d2ec8c848838f1188b91f1bbdad2bd13651185c (diff)
coverity: pass structs by const ref
-rw-r--r--src/lib/MSPUBParser.h4
-rw-r--r--src/lib/MSPUBTypes.h4
2 files changed, 4 insertions, 4 deletions
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;
};