Commit 442be9e3 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Enable a few more clang-tidy bugprone checks

parent 095735fa
......@@ -40,7 +40,7 @@ build_clang_libcpp:
script:
- git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
- mkdir -p build && cd build
- CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,bugprone-too-small-loop-variable;-warnings-as-errors=*" ..
- CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" ..
- ninja
- ctest --output-on-failure
......
......@@ -4345,7 +4345,7 @@ bool AnnotAppearanceBuilder::drawText(const GooString *text, const GooString *da
x = borderWidth;
break;
case quaddingCentered:
x = borderWidth + (comb - charCount) / 2 * w;
x = borderWidth + (comb - charCount) / 2.0 * w;
break;
case quaddingRightJustified:
x = borderWidth + (comb - charCount) * w;
......
......@@ -32,7 +32,6 @@
class Annot;
class AnnotPath;
class Link;
class Page;
class PDFRectangle;
......
/* poppler-link.h: qt interface to poppler
* Copyright (C) 2006, 2013, 2016, 2018, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2006, 2013, 2016, 2018, 2019, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2007-2008, 2010, Pino Toscano <pino@kde.org>
* Copyright (C) 2010, 2012, Guillermo Amaral <gamaral@kdab.com>
* Copyright (C) 2012, Tobias Koenig <tokoe@kdab.com>
......@@ -34,8 +34,6 @@
struct Ref;
class MediaRendition;
class MovieAnnotation;
class ScreenAnnotation;
namespace Poppler {
......@@ -53,6 +51,8 @@ class LinkRenditionPrivate;
class LinkOCGStatePrivate;
class LinkHidePrivate;
class MediaRendition;
class MovieAnnotation;
class ScreenAnnotation;
class SoundObject;
/**
......
......@@ -21,8 +21,8 @@ void TestObject::benchDefaultConstructor() {
}
void TestObject::benchMoveConstructor() {
Object src;
QBENCHMARK {
Object src;
Object dst{std::move(src)};
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment