summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Alonso(fr) <alonso.laurent@gmail.fr>2020-04-06 19:43:23 +0200
committerLaurent Alonso(fr) <alonso.laurent@gmail.fr>2020-04-06 19:43:23 +0200
commit1d952aa98f118d2a88a1af813bbef88c0b74350e (patch)
tree3f60f4985e6d942f7ce6a4b322872346f8c3fc35
parenta62b5fb16b3c731fdbe7cf666bf6c23139b877d0 (diff)
cppcheck: correct some warnings...
Change-Id: I58de48b8e69bfde92b7a8d2160efa11333f1380f
-rw-r--r--src/lib/IWAObjectIndex.cpp2
-rw-r--r--src/lib/IWAParser.cpp1
-rw-r--r--src/lib/IWAText.cpp2
-rw-r--r--src/lib/IWAText.h2
-rw-r--r--src/lib/IWORKFormula.h2
-rw-r--r--src/lib/IWORKOutputElements.cpp58
-rw-r--r--src/lib/IWORKPath.cpp4
-rw-r--r--src/lib/IWORKRecorder.cpp22
-rw-r--r--src/lib/IWORKShape.cpp2
-rw-r--r--src/lib/IWORKTableRecorder.cpp6
-rw-r--r--src/lib/IWORKTextRecorder.cpp24
-rw-r--r--src/lib/IWORKZlibStream.h2
-rw-r--r--src/lib/KEY1Parser.cpp2
-rw-r--r--src/lib/PAG1Parser.cpp2
-rw-r--r--src/lib/contexts/IWORKDirectCollector.h2
-rw-r--r--src/lib/contexts/IWORKPushCollector.h2
-rw-r--r--src/lib/contexts/PAG1TextStorageElement.cpp8
17 files changed, 70 insertions, 73 deletions
diff --git a/src/lib/IWAObjectIndex.cpp b/src/lib/IWAObjectIndex.cpp
index 424e052..d438543 100644
--- a/src/lib/IWAObjectIndex.cpp
+++ b/src/lib/IWAObjectIndex.cpp
@@ -142,7 +142,7 @@ boost::optional<unsigned> IWAObjectIndex::getObjectType(const unsigned id) const
{
// improve me
boost::optional<IWAMessage> msg;
- unsigned type;
+ unsigned type=0; // for g++-7
queryObject(id, type, msg);
if (!msg)
return boost::none;
diff --git a/src/lib/IWAParser.cpp b/src/lib/IWAParser.cpp
index ae72e37..fd0540e 100644
--- a/src/lib/IWAParser.cpp
+++ b/src/lib/IWAParser.cpp
@@ -3101,7 +3101,6 @@ void IWAParser::parseCustomFormat(unsigned id)
ETONYEK_DEBUG_MSG(("IWAParser::parseFormat: find unexpected data size\n"));
return;
}
- std::map<uint64_t, std::string> idToFormatMap;
for (size_t i=0; i<uidLists.size(); ++i)
{
auto const &formatMsg=formatList[i];
diff --git a/src/lib/IWAText.cpp b/src/lib/IWAText.cpp
index ad10ea3..23c0dda 100644
--- a/src/lib/IWAText.cpp
+++ b/src/lib/IWAText.cpp
@@ -38,7 +38,7 @@ void flushText(string &text, IWORKText &collector)
}
-IWAText::IWAText(const std::string text, IWORKLanguageManager &langManager)
+IWAText::IWAText(const std::string &text, IWORKLanguageManager &langManager)
: m_text(text.c_str())
, m_langManager(langManager)
, m_pageMasters()
diff --git a/src/lib/IWAText.h b/src/lib/IWAText.h
index 3cb93dc..b1f2426 100644
--- a/src/lib/IWAText.h
+++ b/src/lib/IWAText.h
@@ -30,7 +30,7 @@ class IWORKText;
class IWAText
{
public:
- IWAText(const std::string text, IWORKLanguageManager &langManager);
+ IWAText(const std::string &text, IWORKLanguageManager &langManager);
void setPageMasters(const std::map<unsigned, IWORKStylePtr_t> &pageMasters);
void setSections(const std::map<unsigned, IWORKStylePtr_t> &sections);
diff --git a/src/lib/IWORKFormula.h b/src/lib/IWORKFormula.h
index 49045c4..d004323 100644
--- a/src/lib/IWORKFormula.h
+++ b/src/lib/IWORKFormula.h
@@ -30,7 +30,7 @@ class IWORKFormula
public:
struct Token;
- IWORKFormula(const boost::optional<unsigned> &hc);
+ explicit IWORKFormula(const boost::optional<unsigned> &hc);
bool parse(const std::string &formula);
bool parse(const std::vector<Token> &formula);
diff --git a/src/lib/IWORKOutputElements.cpp b/src/lib/IWORKOutputElements.cpp
index 72c22fd..4d6bc82 100644
--- a/src/lib/IWORKOutputElements.cpp
+++ b/src/lib/IWORKOutputElements.cpp
@@ -173,7 +173,7 @@ public:
class DefineSheetNumberingStyleElement : public IWORKOutputElement
{
public:
- DefineSheetNumberingStyleElement(const librevenge::RVNGPropertyList &propList) :
+ explicit DefineSheetNumberingStyleElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~DefineSheetNumberingStyleElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -184,7 +184,7 @@ private:
class DrawGraphicObjectElement : public IWORKOutputElement
{
public:
- DrawGraphicObjectElement(const librevenge::RVNGPropertyList &propList) :
+ explicit DrawGraphicObjectElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~DrawGraphicObjectElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -195,7 +195,7 @@ private:
class DrawPathElement : public IWORKOutputElement
{
public:
- DrawPathElement(const librevenge::RVNGPropertyList &propList) :
+ explicit DrawPathElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~DrawPathElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -206,7 +206,7 @@ private:
class DrawPolylineElement : public IWORKOutputElement
{
public:
- DrawPolylineElement(const librevenge::RVNGPropertyList &propList) :
+ explicit DrawPolylineElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~DrawPolylineElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -241,7 +241,7 @@ public:
class InsertBinaryObjectElement : public IWORKOutputElement
{
public:
- InsertBinaryObjectElement(const librevenge::RVNGPropertyList &propList) :
+ explicit InsertBinaryObjectElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~InsertBinaryObjectElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -252,7 +252,7 @@ private:
class InsertCoveredTableCellElement : public IWORKOutputElement
{
public:
- InsertCoveredTableCellElement(const librevenge::RVNGPropertyList &propList) :
+ explicit InsertCoveredTableCellElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~InsertCoveredTableCellElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -263,7 +263,7 @@ private:
class InsertFieldElement : public IWORKOutputElement
{
public:
- InsertFieldElement(const librevenge::RVNGPropertyList &propList) :
+ explicit InsertFieldElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~InsertFieldElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -298,7 +298,7 @@ public:
class InsertTextElement : public IWORKOutputElement
{
public:
- InsertTextElement(const librevenge::RVNGString &text) :
+ explicit InsertTextElement(const librevenge::RVNGString &text) :
m_text(text) {}
~InsertTextElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -309,7 +309,7 @@ private:
class OpenCommentElement : public IWORKOutputElement
{
public:
- OpenCommentElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenCommentElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenCommentElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -320,7 +320,7 @@ private:
class OpenEndnoteElement : public IWORKOutputElement
{
public:
- OpenEndnoteElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenEndnoteElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenEndnoteElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -348,7 +348,7 @@ private:
class OpenFooterElement : public IWORKOutputElement
{
public:
- OpenFooterElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenFooterElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenFooterElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -359,7 +359,7 @@ private:
class OpenFootnoteElement : public IWORKOutputElement
{
public:
- OpenFootnoteElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenFootnoteElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenFootnoteElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -370,7 +370,7 @@ private:
class OpenFrameElement : public IWORKOutputElement
{
public:
- OpenFrameElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenFrameElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenFrameElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -381,7 +381,7 @@ private:
class OpenGroupElement : public IWORKOutputElement
{
public:
- OpenGroupElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenGroupElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenGroupElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -392,7 +392,7 @@ private:
class OpenHeaderElement : public IWORKOutputElement
{
public:
- OpenHeaderElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenHeaderElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenHeaderElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -403,7 +403,7 @@ private:
class OpenLinkElement : public IWORKOutputElement
{
public:
- OpenLinkElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenLinkElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenLinkElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -414,7 +414,7 @@ private:
class OpenListElementElement : public IWORKOutputElement
{
public:
- OpenListElementElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenListElementElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenListElementElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -425,7 +425,7 @@ private:
class OpenOrderedListLevelElement : public IWORKOutputElement
{
public:
- OpenOrderedListLevelElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenOrderedListLevelElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenOrderedListLevelElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -436,7 +436,7 @@ private:
class OpenParagraphElement : public IWORKOutputElement
{
public:
- OpenParagraphElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenParagraphElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenParagraphElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -447,7 +447,7 @@ private:
class OpenSectionElement : public IWORKOutputElement
{
public:
- OpenSectionElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenSectionElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenSectionElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -458,7 +458,7 @@ private:
class OpenSpanElement : public IWORKOutputElement
{
public:
- OpenSpanElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenSpanElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenSpanElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -469,7 +469,7 @@ private:
class OpenTableElement : public IWORKOutputElement
{
public:
- OpenTableElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenTableElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenTableElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -480,7 +480,7 @@ private:
class OpenTableCellElement : public IWORKOutputElement
{
public:
- OpenTableCellElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenTableCellElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenTableCellElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -491,7 +491,7 @@ private:
class OpenTableRowElement : public IWORKOutputElement
{
public:
- OpenTableRowElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenTableRowElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenTableRowElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -502,7 +502,7 @@ private:
class OpenUnorderedListLevelElement : public IWORKOutputElement
{
public:
- OpenUnorderedListLevelElement(const librevenge::RVNGPropertyList &propList) :
+ explicit OpenUnorderedListLevelElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~OpenUnorderedListLevelElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -513,7 +513,7 @@ private:
class SetStyleElement : public IWORKOutputElement
{
public:
- SetStyleElement(const librevenge::RVNGPropertyList &propList) :
+ explicit SetStyleElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~SetStyleElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -524,7 +524,7 @@ private:
class StartLayerElement : public IWORKOutputElement
{
public:
- StartLayerElement(const librevenge::RVNGPropertyList &propList) :
+ explicit StartLayerElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~StartLayerElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -535,7 +535,7 @@ private:
class StartNotesElement : public IWORKOutputElement
{
public:
- StartNotesElement(const librevenge::RVNGPropertyList &propList) :
+ explicit StartNotesElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~StartNotesElement() override {}
void write(IWORKDocumentInterface *iface) const override;
@@ -546,7 +546,7 @@ private:
class StartTextObjectElement : public IWORKOutputElement
{
public:
- StartTextObjectElement(const librevenge::RVNGPropertyList &propList) :
+ explicit StartTextObjectElement(const librevenge::RVNGPropertyList &propList) :
m_propList(propList) {}
~StartTextObjectElement() override {}
void write(IWORKDocumentInterface *iface) const override;
diff --git a/src/lib/IWORKPath.cpp b/src/lib/IWORKPath.cpp
index be91471..28450d6 100644
--- a/src/lib/IWORKPath.cpp
+++ b/src/lib/IWORKPath.cpp
@@ -156,7 +156,7 @@ struct PathGrammar : public qi::grammar<Iterator, IWORKPath::Impl(), ascii::spac
, line()
, cCurve()
, qCurve()
- , close()
+ , close('Z')
{
using qi::attr;
using qi::as;
@@ -172,8 +172,6 @@ struct PathGrammar : public qi::grammar<Iterator, IWORKPath::Impl(), ascii::spac
cCurve %= 'C' >> double_ >> double_ >> double_ >> double_ >> double_ >> double_;
- close = 'Z';
-
curve %= as<Curve_t>()[move >> +(line | cCurve | qCurve) >> -close];
path %= as<Path_t>()[+curve >> *(omit[move]) ];
diff --git a/src/lib/IWORKRecorder.cpp b/src/lib/IWORKRecorder.cpp
index 3cbf1e6..bd7fe37 100644
--- a/src/lib/IWORKRecorder.cpp
+++ b/src/lib/IWORKRecorder.cpp
@@ -28,7 +28,7 @@ namespace
struct CollectStyle
{
- CollectStyle(const IWORKStylePtr_t &style)
+ explicit CollectStyle(const IWORKStylePtr_t &style)
: m_style(style)
{
}
@@ -38,7 +38,7 @@ struct CollectStyle
struct SetGraphicStyle
{
- SetGraphicStyle(const IWORKStylePtr_t &style)
+ explicit SetGraphicStyle(const IWORKStylePtr_t &style)
: m_style(style)
{
}
@@ -48,7 +48,7 @@ struct SetGraphicStyle
struct CollectGeometry
{
- CollectGeometry(const IWORKGeometryPtr_t &geometry)
+ explicit CollectGeometry(const IWORKGeometryPtr_t &geometry)
: m_geometry(geometry)
{
}
@@ -58,7 +58,7 @@ struct CollectGeometry
struct CollectPath
{
- CollectPath(const IWORKPathPtr_t &path)
+ explicit CollectPath(const IWORKPathPtr_t &path)
: m_path(path)
{
}
@@ -84,7 +84,7 @@ struct CollectImage
struct CollectLine
{
- CollectLine(const IWORKLinePtr_t &line)
+ explicit CollectLine(const IWORKLinePtr_t &line)
: m_line(line)
{
}
@@ -121,7 +121,7 @@ struct CollectMedia
struct CollectStylesheet
{
- CollectStylesheet(const IWORKStylesheetPtr_t &stylesheet)
+ explicit CollectStylesheet(const IWORKStylesheetPtr_t &stylesheet)
: m_stylesheet(stylesheet)
{
}
@@ -131,7 +131,7 @@ struct CollectStylesheet
struct CollectTable
{
- CollectTable(const std::shared_ptr<IWORKTable> &table)
+ explicit CollectTable(const std::shared_ptr<IWORKTable> &table)
: m_table(table)
{
}
@@ -141,7 +141,7 @@ struct CollectTable
struct CollectText
{
- CollectText(const std::shared_ptr<IWORKText> &text)
+ explicit CollectText(const std::shared_ptr<IWORKText> &text)
: m_text(text)
{
}
@@ -152,7 +152,7 @@ struct CollectText
enum OperationType { Attachment, Attachments, Group, GroupSymbol, Level };
struct StartOp
{
- StartOp(const OperationType &type)
+ explicit StartOp(const OperationType &type)
: m_type(type)
{
}
@@ -162,7 +162,7 @@ struct StartOp
struct EndOp
{
- EndOp(OperationType type)
+ explicit EndOp(OperationType type)
: m_type(type)
{
}
@@ -172,7 +172,7 @@ struct EndOp
struct PushStylesheet
{
- PushStylesheet(const IWORKStylesheetPtr_t &stylesheet)
+ explicit PushStylesheet(const IWORKStylesheetPtr_t &stylesheet)
: m_stylesheet(stylesheet)
{
}
diff --git a/src/lib/IWORKShape.cpp b/src/lib/IWORKShape.cpp
index 40f52e7..9fb2bc4 100644
--- a/src/lib/IWORKShape.cpp
+++ b/src/lib/IWORKShape.cpp
@@ -150,7 +150,7 @@ IWORKPathPtr_t makePolyLine(const deque<Point> inputPoints, bool close = true)
struct TransformPoint
{
- TransformPoint(const glm::dmat3 &tr)
+ explicit TransformPoint(const glm::dmat3 &tr)
: m_tr(tr)
{
}
diff --git a/src/lib/IWORKTableRecorder.cpp b/src/lib/IWORKTableRecorder.cpp
index 9483848..c4a9374 100644
--- a/src/lib/IWORKTableRecorder.cpp
+++ b/src/lib/IWORKTableRecorder.cpp
@@ -67,7 +67,7 @@ struct SetHeaders
struct SetBandedRows
{
- SetBandedRows(const bool banded)
+ explicit SetBandedRows(const bool banded)
: m_banded(banded)
{
}
@@ -89,7 +89,7 @@ struct SetRepeated
struct SetOrder
{
- SetOrder(const int order)
+ explicit SetOrder(const int order)
: m_order(order)
{
}
@@ -99,7 +99,7 @@ struct SetOrder
struct SetStyle
{
- SetStyle(const IWORKStylePtr_t &style)
+ explicit SetStyle(const IWORKStylePtr_t &style)
: m_style(style)
{
}
diff --git a/src/lib/IWORKTextRecorder.cpp b/src/lib/IWORKTextRecorder.cpp
index 7bff4cc..68bd6c0 100644
--- a/src/lib/IWORKTextRecorder.cpp
+++ b/src/lib/IWORKTextRecorder.cpp
@@ -24,7 +24,7 @@ namespace
struct PushBaseLayoutStyle
{
- PushBaseLayoutStyle(const IWORKStylePtr_t &style)
+ explicit PushBaseLayoutStyle(const IWORKStylePtr_t &style)
: m_style(style)
{
}
@@ -34,7 +34,7 @@ struct PushBaseLayoutStyle
struct PushBaseParagraphStyle
{
- PushBaseParagraphStyle(const IWORKStylePtr_t &style)
+ explicit PushBaseParagraphStyle(const IWORKStylePtr_t &style)
: m_style(style)
{
}
@@ -44,7 +44,7 @@ struct PushBaseParagraphStyle
struct SetLayoutStyle
{
- SetLayoutStyle(const IWORKStylePtr_t &style)
+ explicit SetLayoutStyle(const IWORKStylePtr_t &style)
: m_style(style)
{
}
@@ -58,7 +58,7 @@ struct FlushLayout
struct SetListStyle
{
- SetListStyle(const IWORKStylePtr_t &style)
+ explicit SetListStyle(const IWORKStylePtr_t &style)
: m_style(style)
{
}
@@ -68,7 +68,7 @@ struct SetListStyle
struct SetListLevel
{
- SetListLevel(const unsigned level)
+ explicit SetListLevel(const unsigned level)
: m_level(level)
{
}
@@ -82,7 +82,7 @@ struct FlushList
struct SetParagraphStyle
{
- SetParagraphStyle(const IWORKStylePtr_t &style)
+ explicit SetParagraphStyle(const IWORKStylePtr_t &style)
: m_style(style)
{
}
@@ -96,7 +96,7 @@ struct FlushParagraph
struct SetSpanStyle
{
- SetSpanStyle(const IWORKStylePtr_t &style)
+ explicit SetSpanStyle(const IWORKStylePtr_t &style)
: m_style(style)
{
}
@@ -106,7 +106,7 @@ struct SetSpanStyle
struct SetLanguage
{
- SetLanguage(const IWORKStylePtr_t &style)
+ explicit SetLanguage(const IWORKStylePtr_t &style)
: m_style(style)
{
}
@@ -120,7 +120,7 @@ struct FlushSpan
struct InsertField
{
- InsertField(IWORKFieldType type)
+ explicit InsertField(IWORKFieldType type)
: m_type(type)
{
}
@@ -130,7 +130,7 @@ struct InsertField
struct OpenLink
{
- OpenLink(const std::string &url)
+ explicit OpenLink(const std::string &url)
: m_url(url)
{
}
@@ -144,7 +144,7 @@ struct CloseLink
struct InsertText
{
- InsertText(const std::string &text)
+ explicit InsertText(const std::string &text)
: m_text(text)
{
}
@@ -162,7 +162,7 @@ struct InsertSpace
struct InsertBreak
{
- InsertBreak(IWORKBreakType type)
+ explicit InsertBreak(IWORKBreakType type)
: m_type(type)
{
}
diff --git a/src/lib/IWORKZlibStream.h b/src/lib/IWORKZlibStream.h
index 0dab5a5..c3769ad 100644
--- a/src/lib/IWORKZlibStream.h
+++ b/src/lib/IWORKZlibStream.h
@@ -18,7 +18,7 @@ namespace libetonyek
class IWORKZlibStream : public librevenge::RVNGInputStream
{
public:
- IWORKZlibStream(const RVNGInputStreamPtr_t &stream);
+ explicit IWORKZlibStream(const RVNGInputStreamPtr_t &stream);
~IWORKZlibStream() override;
bool isStructured() override;
diff --git a/src/lib/KEY1Parser.cpp b/src/lib/KEY1Parser.cpp
index 459b976..dd068a4 100644
--- a/src/lib/KEY1Parser.cpp
+++ b/src/lib/KEY1Parser.cpp
@@ -435,7 +435,7 @@ namespace
class BasicShapeElement : public KEY1XMLElementContextBase
{
public:
- BasicShapeElement(KEY1ParserState &state);
+ explicit BasicShapeElement(KEY1ParserState &state);
protected:
void attribute(int name, const char *value) override;
diff --git a/src/lib/PAG1Parser.cpp b/src/lib/PAG1Parser.cpp
index 4c8baae..48fdf53 100644
--- a/src/lib/PAG1Parser.cpp
+++ b/src/lib/PAG1Parser.cpp
@@ -127,7 +127,7 @@ namespace
class GroupElement : public PAG1XMLContextBase<IWORKGroupElement>
{
public:
- GroupElement(PAG1ParserState &state);
+ explicit GroupElement(PAG1ParserState &state);
private:
IWORKXMLContextPtr_t element(int name) override;
diff --git a/src/lib/contexts/IWORKDirectCollector.h b/src/lib/contexts/IWORKDirectCollector.h
index fe5d6fe..d44243d 100644
--- a/src/lib/contexts/IWORKDirectCollector.h
+++ b/src/lib/contexts/IWORKDirectCollector.h
@@ -21,7 +21,7 @@ template<typename Type, class Container = std::deque<Type> >
class IWORKDirectCollector
{
public:
- IWORKDirectCollector(Container &collection)
+ explicit IWORKDirectCollector(Container &collection)
: m_collection(collection)
{
}
diff --git a/src/lib/contexts/IWORKPushCollector.h b/src/lib/contexts/IWORKPushCollector.h
index f75431b..fa8af62 100644
--- a/src/lib/contexts/IWORKPushCollector.h
+++ b/src/lib/contexts/IWORKPushCollector.h
@@ -25,7 +25,7 @@ template<typename Type, class Container = std::deque<Type> >
class IWORKPushCollector
{
public:
- IWORKPushCollector(Container &collection)
+ explicit IWORKPushCollector(Container &collection)
: m_collection(collection)
, m_value()
{
diff --git a/src/lib/contexts/PAG1TextStorageElement.cpp b/src/lib/contexts/PAG1TextStorageElement.cpp
index 573a0af..7721c9b 100644
--- a/src/lib/contexts/PAG1TextStorageElement.cpp
+++ b/src/lib/contexts/PAG1TextStorageElement.cpp
@@ -239,7 +239,7 @@ namespace
class AttachmentRef : public PAG1XMLElementContextBase
{
public:
- AttachmentRef(PAG1ParserState &state);
+ explicit AttachmentRef(PAG1ParserState &state);
private:
void attribute(const int name, const char *const value) override;
@@ -404,7 +404,7 @@ namespace
class FootnoteHelper
{
public:
- FootnoteHelper(PAG1ParserState &state);
+ explicit FootnoteHelper(PAG1ParserState &state);
IWORKXMLContextPtr_t element(int name);
const char *text(const char *value);
@@ -492,7 +492,7 @@ namespace
class LinkElement : public PAG1XMLContextBase<IWORKLinkElement>
{
public:
- LinkElement(PAG1ParserState &state);
+ explicit LinkElement(PAG1ParserState &state);
private:
IWORKXMLContextPtr_t element(int name) override;
@@ -652,7 +652,7 @@ namespace
class SectionElement : public PAG1XMLElementContextBase
{
public:
- SectionElement(PAG1ParserState &state);
+ explicit SectionElement(PAG1ParserState &state);
private:
void open();