diff options
author | ALONSO Laurent <laurent.alonso@inria.fr> | 2021-02-11 12:34:18 +0100 |
---|---|---|
committer | ALONSO Laurent <laurent.alonso@inria.fr> | 2021-02-11 12:34:18 +0100 |
commit | 14144c163dff19ca9f52a087deaf2518ee15128a (patch) | |
tree | 1c92c5f3dc94b8f94aa485d2774b0afc528fcc46 | |
parent | 4b4d879a6db69ea05b89fdf99df8cb5d902d16b6 (diff) |
Remove a warning and add some bool(optional) to be more coherent...
Change-Id: Id86f0e974cae5be03f32c4677611fd2521e3f5ef
-rw-r--r-- | src/lib/IWAParser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/IWAParser.cpp b/src/lib/IWAParser.cpp index fd0540e..7fd95c3 100644 --- a/src/lib/IWAParser.cpp +++ b/src/lib/IWAParser.cpp @@ -1237,7 +1237,7 @@ bool IWAParser::parseDrawableShape(const IWAMessage &msg, bool isConnectionLine) { // try to retrieve the shape's size in the path std::map<unsigned,unsigned> const cIdToSizeId= { { 3, 3}, { 4, 3}, {5, 2}, { 6, 1}, { 8, 2} }; - for (auto const it : cIdToSizeId) + for (auto const &it : cIdToSizeId) { if (!get(path).message(it.first)) continue; auto const &pathSize=readSize(get(get(path).message(it.first)), it.second); @@ -2860,12 +2860,12 @@ void IWAParser::parseTile(const unsigned id) cellStyle.reset(new IWORKStyle(props, none, cellStyle)); } - bool needText=textRef || (bool(text) && !formula && cellType == IWORK_CELL_TYPE_TEXT); + bool needText=bool(textRef) || (bool(text) && !formula && cellType == IWORK_CELL_TYPE_TEXT); if (needText) { assert(!m_currentText); m_currentText = m_collector.createText(m_langManager); - if (textRef) + if (bool(textRef)) parseText(get(textRef)); else { @@ -2880,7 +2880,7 @@ void IWAParser::parseTile(const unsigned id) } } m_currentTable->m_table->insertCell(column, row, text, m_currentText, dateTime, 1, 1, formula, unsigned(row*256+column), cellStyle, cellType); - if (comment) + if (bool(comment)) { auto currentText=m_currentText; m_currentText = m_collector.createText(m_langManager); |