diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-01-08 18:45:12 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-01-08 18:45:12 +0100 |
commit | aab2d48237e0713bc8991c81469fd40a30926b29 (patch) | |
tree | 2e3c78666504d5feb74209e679cef7459a2fabda | |
parent | 2f5e79593b5d4c9df1befa187e6f33cde847445c (diff) |
Some cppcheck cleaning
-rw-r--r-- | src/lib/VSDSVGGenerator.cpp | 3 | ||||
-rw-r--r-- | src/lib/VSDXCharacterList.cpp | 2 | ||||
-rw-r--r-- | src/lib/VSDXContentCollector.cpp | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/VSDSVGGenerator.cpp b/src/lib/VSDSVGGenerator.cpp index 7623ecf..541f519 100644 --- a/src/lib/VSDSVGGenerator.cpp +++ b/src/lib/VSDSVGGenerator.cpp @@ -115,13 +115,12 @@ void libvisio::VSDSVGGenerator::setStyle(const ::WPXPropertyList &propList, cons m_gradient = gradient; if(m_style["draw:shadow"] && m_style["draw:shadow"]->getStr() == "visible") { - unsigned shadowColour = 0; double shadowRed = 0.0; double shadowGreen = 0.0; double shadowBlue = 0.0; if (m_style["draw:shadow-color"]) { - shadowColour = stringToColour(m_style["draw:shadow-color"]->getStr()); + unsigned shadowColour = stringToColour(m_style["draw:shadow-color"]->getStr()); shadowRed = (double)((shadowColour & 0x00ff0000) >> 16)/255.0; shadowGreen = (double)((shadowColour & 0x0000ff00) >> 8)/255.0; shadowBlue = (double)(shadowColour & 0x000000ff)/255.0; diff --git a/src/lib/VSDXCharacterList.cpp b/src/lib/VSDXCharacterList.cpp index 30daef7..b88cf20 100644 --- a/src/lib/VSDXCharacterList.cpp +++ b/src/lib/VSDXCharacterList.cpp @@ -135,7 +135,7 @@ void libvisio::VSDXCharacterList::handle(VSDXCollector *collector) if (empty()) return; std::map<unsigned, VSDXCharacterListElement *>::iterator iter; - if (m_elementsOrder.size()) + if (!m_elementsOrder.empty()) { for (unsigned i = 0; i < m_elementsOrder.size(); i++) { diff --git a/src/lib/VSDXContentCollector.cpp b/src/lib/VSDXContentCollector.cpp index 2411997..960a1c2 100644 --- a/src/lib/VSDXContentCollector.cpp +++ b/src/lib/VSDXContentCollector.cpp @@ -731,7 +731,7 @@ void libvisio::VSDXContentCollector::_flushCurrentForeignData() void libvisio::VSDXContentCollector::_flushCurrentPage() { - if (m_pageShapeOrder.size()) + if (!m_pageShapeOrder.empty()) { std::stack<std::pair<unsigned, VSDXOutputElementList> > groupTextStack; for (std::list<unsigned>::iterator iterList = m_pageShapeOrder.begin(); iterList != m_pageShapeOrder.end(); ++iterList) @@ -1980,7 +1980,7 @@ void libvisio::VSDXContentCollector::_handleLevelChange(unsigned level) m_NURBSData = m_stencilShape->m_nurbsData; m_polylineData = m_stencilShape->m_polylineData; - if (m_currentGeometry.size() == 0) + if (m_currentGeometry.empty()) { for (unsigned i = 0; i < m_stencilShape->m_geometries.size(); i++) { |