From e8377a78c88424dd76f8fc47c61f436efd5470e7 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Mon, 11 Feb 2013 18:57:49 +0100 Subject: cppcheck (bzr r12117) --- src/dom/xpathparser.cpp | 2 +- src/dom/xpathtoken.cpp | 20 +++++++------------- src/dom/xpathtoken.h | 6 +----- src/extension/internal/filter/bumps.h | 3 --- src/extension/internal/image-resolution.cpp | 8 +------- src/extension/internal/pdfinput/svg-builder.cpp | 4 ++-- 6 files changed, 12 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/dom/xpathparser.cpp b/src/dom/xpathparser.cpp index 393c12cda..b19975966 100644 --- a/src/dom/xpathparser.cpp +++ b/src/dom/xpathparser.cpp @@ -131,7 +131,7 @@ void XPathParser::lexicalTokenDump() printf("####### LEXICAL TOKENS #######\n"); for (unsigned int i=0 ; igetType() == 2 ) { // Shading pattern GfxShadingPattern *shading_pattern = static_cast(pattern); double *ptm; - double ittm[6]; // invert ttm double m[6] = {1, 0, 0, 1, 0, 0}; double det; @@ -638,6 +637,7 @@ gchar *SvgBuilder::_createPattern(GfxPattern *pattern, GfxState *state, bool is_ ptm = shading_pattern->getMatrix(); det = ttm[0] * ttm[3] - ttm[1] * ttm[2]; if (det) { + double ittm[6]; // invert ttm ittm[0] = ttm[3] / det; ittm[1] = -ttm[1] / det; ittm[2] = -ttm[2] / det; @@ -1208,7 +1208,7 @@ void SvgBuilder::updateTextMatrix(GfxState *state) { */ void SvgBuilder::_flushText() { // Ignore empty strings - if ( _glyphs.size() < 1 ) { + if ( _glyphs.empty()) { _glyphs.clear(); return; } -- cgit v1.2.3