[poppler] .clang-tidy .gitlab-ci.yml glib/poppler-document.cc goo/gfile.h poppler/CairoOutputDev.h poppler/Gfx.h poppler/GfxState.h poppler/GlobalParams.cc poppler/OutputDev.h poppler/PDFDoc.h poppler/PSOutputDev.h poppler/SplashOutputDev.h poppler/TextOutputDev.h qt5/src qt6/src README.contributors splash/Splash.h test/cairo-thread-test.cc test/perf-test.cc utils/InMemoryFile.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 27 09:40:23 UTC 2023


 .clang-tidy               |    2 
 .gitlab-ci.yml            |   20 +--
 README.contributors       |    2 
 glib/poppler-document.cc  |    2 
 goo/gfile.h               |   10 -
 poppler/CairoOutputDev.h  |  104 +++---------------
 poppler/Gfx.h             |   10 -
 poppler/GfxState.h        |   65 ++---------
 poppler/GlobalParams.cc   |    6 -
 poppler/OutputDev.h       |  107 +++---------------
 poppler/PDFDoc.h          |  260 +++++++++-------------------------------------
 poppler/PSOutputDev.h     |  155 +++++----------------------
 poppler/SplashOutputDev.h |   15 --
 poppler/TextOutputDev.h   |  125 ++++------------------
 qt5/src/poppler-private.h |    5 
 qt6/src/poppler-private.h |    5 
 splash/Splash.h           |   15 --
 test/cairo-thread-test.cc |    2 
 test/perf-test.cc         |    2 
 utils/InMemoryFile.h      |    5 
 20 files changed, 195 insertions(+), 722 deletions(-)

New commits:
commit b5aa09403e0f106f51292683c1841908167337ea
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Oct 12 11:59:27 2022 +0200

    clang 15

diff --git a/.clang-tidy b/.clang-tidy
index 894d695f..6fe69b4a 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,5 +1,5 @@
 ---
-Checks:          '-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,readability-braces-around-statements,modernize-deprecated-headers,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-use-bool-literals,modernize-redundant-void-arg,modernize-loop-convert,google-explicit-constructor,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation,-bugprone-sizeof-expression,-bugprone-branch-clone,-bugprone-reserved-identifier,-bugprone-suspicious-include,-performance-no-int-to-ptr,-bugprone-easily-swappable-parameters,-bugprone-implicit-widening-of-multiplication-result'
+Checks:          '-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,readability-braces-around-statements,modernize-deprecated-headers,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-use-bool-literals,modernize-redundant-void-arg,modernize-loop-convert,google-explicit-constructor,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation,-bugprone-sizeof-expression,-bugprone-branch-clone,-bugprone-reserved-identifier,-bugprone-suspicious-include,-performance-no-int-to-ptr,-bugprone-easily-swappable-parameters,-bugprone-implicit-widening-of-multiplication-result,-bugprone-assignment-in-if-condition,-bugprone-unchecked-optional-access'
 WarningsAsErrors: '*'
 HeaderFilterRegex: '.'
 AnalyzeTemporaryDtors: false
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a1e95b1f..fb3fafbf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,9 +30,9 @@ clang_format:
   stage: build
   before_script:
   - apt-get update
-  - apt-get install --yes --no-install-recommends git clang-format-14
+  - apt-get install --yes --no-install-recommends git clang-format-15
   script:
-    - find . \( -name "*.cpp" -or -name "*.h"  -or -name "*.c"  -or -name "*.cc" \) -exec clang-format-14 -i {} \;
+    - find . \( -name "*.cpp" -or -name "*.h"  -or -name "*.c"  -or -name "*.cc" \) -exec clang-format-15 -i {} \;
     - git diff --exit-code
 
 build:
@@ -44,17 +44,17 @@ build:
     - ninja -j ${FDO_CI_CONCURRENT}
     - ctest --output-on-failure
 
-build_clang14_libcpp:
+build_clang15_libcpp:
   stage: build
   script:
     - echo "We want to compile with C++23 here because it has some nice things like deleted std::string nullptr constructor"
     - sed -i -e "s at CMAKE_CXX_STANDARD 17 at CMAKE_CXX_STANDARD 23 at g" CMakeLists.txt
     - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
-    - apt-get install --yes --no-install-recommends libclang-14-dev llvm-14-dev libc++-14-dev libc++abi-14-dev clang-tidy-14 clang-14 libunwind-14-dev gperf jq
+    - apt-get install --yes --no-install-recommends libclang-15-dev llvm-15-dev libc++-15-dev libc++abi-15-dev clang-tidy-15 clang-15 libunwind-15-dev gperf jq
     - srcdir=`pwd` && mkdir -p /tmp/poppler_build && cd /tmp/poppler_build
-    - clang++-14 -fPIC -shared -o goostring-format-checker.so $srcdir/test/goostring-format-checker/goostring-format-checker.cc -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I /usr/lib/llvm-14/include/
+    - clang++-15 -fPIC -shared -o goostring-format-checker.so $srcdir/test/goostring-format-checker/goostring-format-checker.cc -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I /usr/lib/llvm-15/include/
     - echo "We disable Qt6 tests since Qt6 exposes std::string in its ABI which makes it not build in this CI since we're using libc++ but Qt6 in debian is build with libstdc++"
-    - CC=clang-14 CXX=clang++-14 cmake -G Ninja -DCMAKE_CXX_FLAGS="-stdlib=libc++ -Xclang -load -Xclang $PWD/goostring-format-checker.so -Xclang -add-plugin -Xclang goostring-format-checker -Werror -Wno-deprecated-declarations" -DTESTDATADIR=$srcdir/test-data -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_QT6_TESTS=OFF $srcdir
+    - CC=clang-15 CXX=clang++-15 cmake -G Ninja -DCMAKE_CXX_FLAGS="-stdlib=libc++ -Xclang -load -Xclang $PWD/goostring-format-checker.so -Xclang -add-plugin -Xclang goostring-format-checker -Werror -Wno-deprecated-declarations" -DTESTDATADIR=$srcdir/test-data -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_QT6_TESTS=OFF  $srcdir
     - ninja -j ${FDO_CI_CONCURRENT}
     - ctest --output-on-failure
     - echo "This is a complex way of not running clang-tidy over autogenerated files, unfortunately -DCMAKE_CXX_CLANG_TIDY doesn't support that https://gitlab.kitware.com/cmake/cmake/-/issues/19772"
@@ -64,7 +64,7 @@ build_clang14_libcpp:
     - echo "Maybe we can replace this with NOLINTBEGIN in the future https://github.com/llvm/llvm-project/issues/56983"
     - find $srcdir/qt* -name *.cpp -exec sed -E -i '/#include .*moc"$/d' {} \;
     - cp "$srcdir/.clang-tidy" .
-    - run-clang-tidy-14
+    - run-clang-tidy-15
 
 build_ubuntu_20_04:
   stage: build
@@ -95,12 +95,12 @@ build_mingw64_fedora37:
     - mingw64-cmake -G Ninja ..
     - ninja
 
-build_clazy_clang14:
+build_clazy_clang15:
   stage: build
   script:
-    - apt-get install --yes --no-install-recommends clazy clang-14
+    - apt-get install --yes --no-install-recommends clazy clang-15
     - mkdir -p build && cd build
-    - CC=clang-14 CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -G Ninja ..
+    - CC=clang-15 CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -G Ninja ..
     - CLAZY_CHECKS="level0,level1,level2,isempty-vs-count,qhash-with-char-pointer-key,tr-non-literal,no-non-pod-global-static" ninja -j ${FDO_CI_CONCURRENT}
 
 build_android:
diff --git a/README.contributors b/README.contributors
index b310a5b4..798074d2 100644
--- a/README.contributors
+++ b/README.contributors
@@ -29,7 +29,7 @@ To get the clang-format warnings locally instead at CI time we recommend you
 to copy the hooks/pre-commit to your .git
     cp hooks/pre-commit .git/hooks/
 
-We are using clang-format 14 on CI. Unfortunately clang-format is not totally
+We are using clang-format 15 on CI. Unfortunately clang-format is not totally
 compatible with older versions of itself. If CI gives you trouble but your local
 clang-format disagrees, just apply the changes suggested by CI and then commit
 with the --no-verify flag. If you get stuck, don't hesitate to ask the reviewer
diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index ae9cb5fb..7505a6fe 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -2226,7 +2226,7 @@ void poppler_document_reset_form(PopplerDocument *document, GList *fields, gbool
 
         if (form) {
             for (iter = fields; iter != nullptr; iter = iter->next) {
-                list.emplace_back(std::string((char *)iter->data));
+                list.emplace_back((char *)iter->data);
             }
 
             form->reset(list, exclude_fields);
diff --git a/goo/gfile.h b/goo/gfile.h
index 08b1b5dc..516c2fc2 100644
--- a/goo/gfile.h
+++ b/goo/gfile.h
@@ -132,10 +132,7 @@ public:
 #ifdef _WIN32
     static std::unique_ptr<GooFile> open(const wchar_t *fileName);
 
-    ~GooFile()
-    {
-        CloseHandle(handle);
-    }
+    ~GooFile() { CloseHandle(handle); }
 
     // Asuming than on windows you can't change files that are already open
     bool modificationTimeChangedSinceOpen() const;
@@ -145,10 +142,7 @@ private:
     HANDLE handle;
     struct _FILETIME modifiedTimeOnOpen;
 #else
-    ~GooFile()
-    {
-        close(fd);
-    }
+    ~GooFile() { close(fd); }
 
     bool modificationTimeChangedSinceOpen() const;
 
diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h
index 39ba4585..c4c5f8d0 100644
--- a/poppler/CairoOutputDev.h
+++ b/poppler/CairoOutputDev.h
@@ -119,36 +119,21 @@ public:
     // radialShadedFill()?  If this returns false, these shaded fills
     // will be reduced to a series of other drawing operations.
 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
-    bool useShadedFills(int type) override
-    {
-        return type <= 7;
-    }
+    bool useShadedFills(int type) override { return type <= 7; }
 #else
-    bool useShadedFills(int type) override
-    {
-        return type > 1 && type < 4;
-    }
+    bool useShadedFills(int type) override { return type > 1 && type < 4; }
 #endif
 
     // Does this device use FillColorStop()?
-    bool useFillColorStop() override
-    {
-        return true;
-    }
+    bool useFillColorStop() override { return true; }
 
     // Does this device use beginType3Char/endType3Char?  Otherwise,
     // text in Type 3 fonts will be drawn with drawChar/drawString.
-    bool interpretType3Chars() override
-    {
-        return false;
-    }
+    bool interpretType3Chars() override { return false; }
 
     // Does this device need to clip pages to the crop box even when the
     // box is the crop box?
-    bool needClipToCropBox() override
-    {
-        return true;
-    }
+    bool needClipToCropBox() override { return true; }
 
     //----- initialization and control
 
@@ -249,10 +234,7 @@ public:
     // Called to prepare this output dev for rendering CairoType3Font.
     void startType3Render(GfxState *state, XRef *xref);
 
-    bool isReverseVideo()
-    {
-        return false;
-    }
+    bool isReverseVideo() { return false; }
 
     void setCairo(cairo_t *cr);
     void setTextPage(TextPage *text);
@@ -269,27 +251,15 @@ public:
         Type3RenderMask,
         Type3RenderColor
     };
-    void setType3RenderType(Type3RenderType state)
-    {
-        t3_render_state = state;
-    }
+    void setType3RenderType(Type3RenderType state) { t3_render_state = state; }
     void getType3GlyphWidth(double *wx, double *wy)
     {
         *wx = t3_glyph_wx;
         *wy = t3_glyph_wy;
     }
-    bool hasType3GlyphBBox()
-    {
-        return t3_glyph_has_bbox;
-    }
-    double *getType3GlyphBBox()
-    {
-        return t3_glyph_bbox;
-    }
-    bool type3GlyphHasColor()
-    {
-        return t3_glyph_has_color;
-    }
+    bool hasType3GlyphBBox() { return t3_glyph_has_bbox; }
+    double *getType3GlyphBBox() { return t3_glyph_bbox; }
+    bool type3GlyphHasColor() { return t3_glyph_has_color; }
 
 protected:
     void doPath(cairo_t *cairo, GfxState *state, const GfxPath *path);
@@ -329,7 +299,7 @@ protected:
         cairo_line_join_t join;
         double miter;
         int ref_count;
-    } * strokePathClip;
+    } *strokePathClip;
 
     PDFDoc *doc; // the current document
 
@@ -377,7 +347,7 @@ protected:
         GfxColorSpace *cs;
         cairo_matrix_t group_matrix;
         struct ColorSpaceStack *next;
-    } * groupColorSpaceStack;
+    } *groupColorSpaceStack;
 
     struct SaveStateElement
     {
@@ -425,35 +395,20 @@ public:
     // radialShadedFill()?  If this returns false, these shaded fills
     // will be reduced to a series of other drawing operations.
 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2)
-    bool useShadedFills(int type) override
-    {
-        return type <= 7;
-    }
+    bool useShadedFills(int type) override { return type <= 7; }
 #else
-    bool useShadedFills(int type) override
-    {
-        return type < 4;
-    }
+    bool useShadedFills(int type) override { return type < 4; }
 #endif
 
     // Does this device use FillColorStop()?
-    bool useFillColorStop() override
-    {
-        return false;
-    }
+    bool useFillColorStop() override { return false; }
 
     // Does this device use beginType3Char/endType3Char?  Otherwise,
     // text in Type 3 fonts will be drawn with drawChar/drawString.
-    bool interpretType3Chars() override
-    {
-        return false;
-    }
+    bool interpretType3Chars() override { return false; }
 
     // Does this device need non-text content?
-    bool needNonText() override
-    {
-        return true;
-    }
+    bool needNonText() override { return true; }
 
     //----- save/restore graphics state
     void saveState(GfxState *state) override { }
@@ -483,18 +438,9 @@ public:
     void fill(GfxState *state) override { }
     void eoFill(GfxState *state) override { }
     void clipToStrokePath(GfxState *state) override { }
-    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override
-    {
-        return true;
-    }
-    bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override
-    {
-        return true;
-    }
-    bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) override
-    {
-        return true;
-    }
+    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override { return true; }
+    bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override { return true; }
+    bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) override { return true; }
 
     //----- path clipping
     void clip(GfxState *state) override { }
@@ -524,14 +470,8 @@ public:
         imgDrawCbkData = data;
     }
     // Iterate through list of images.
-    int getNumImages() const
-    {
-        return numImages;
-    }
-    CairoImage *getImage(int i) const
-    {
-        return images[i];
-    }
+    int getNumImages() const { return numImages; }
+    CairoImage *getImage(int i) const { return images[i]; }
 
 private:
     void saveImage(CairoImage *image);
diff --git a/poppler/Gfx.h b/poppler/Gfx.h
index 81a620b5..fee97a72 100644
--- a/poppler/Gfx.h
+++ b/poppler/Gfx.h
@@ -166,10 +166,7 @@ public:
     Gfx(const Gfx &) = delete;
     Gfx &operator=(const Gfx &other) = delete;
 
-    XRef *getXRef()
-    {
-        return xref;
-    }
+    XRef *getXRef() { return xref; }
 
     // Interpret a stream or array of streams.
     void display(Object *obj, bool topLevel = true);
@@ -191,10 +188,7 @@ public:
     void popStateGuard();
 
     // Get the current graphics state object.
-    GfxState *getState()
-    {
-        return state;
-    }
+    GfxState *getState() { return state; }
 
     bool checkTransparencyGroup(Dict *resDict);
 
diff --git a/poppler/GfxState.h b/poppler/GfxState.h
index cdbca9ff..9cf1afc1 100644
--- a/poppler/GfxState.h
+++ b/poppler/GfxState.h
@@ -587,14 +587,8 @@ public:
 #ifdef USE_CMS
     char *getPostScriptCSA();
     void buildTransforms(GfxState *state);
-    void setProfile(GfxLCMSProfilePtr &profileA)
-    {
-        profile = profileA;
-    }
-    GfxLCMSProfilePtr getProfile()
-    {
-        return profile;
-    }
+    void setProfile(GfxLCMSProfilePtr &profileA) { profile = profileA; }
+    GfxLCMSProfilePtr getProfile() { return profile; }
 #endif
 
 private:
@@ -606,10 +600,7 @@ private:
 #ifdef USE_CMS
     GfxLCMSProfilePtr profile;
     char *psCSA;
-    int getIntent()
-    {
-        return (transform != nullptr) ? transform->getIntent() : 0;
-    }
+    int getIntent() { return (transform != nullptr) ? transform->getIntent() : 0; }
     std::shared_ptr<GfxColorTransform> transform;
     std::shared_ptr<GfxColorTransform> lineTransform; // color transform for line
     mutable std::map<unsigned int, unsigned int> cmsCache;
@@ -1616,29 +1607,17 @@ public:
 
 #ifdef USE_CMS
     void setDisplayProfile(const GfxLCMSProfilePtr &localDisplayProfileA);
-    GfxLCMSProfilePtr getDisplayProfile()
-    {
-        return localDisplayProfile;
-    }
+    GfxLCMSProfilePtr getDisplayProfile() { return localDisplayProfile; }
     std::shared_ptr<GfxColorTransform> getXYZ2DisplayTransform();
     int getCmsRenderingIntent();
     static GfxLCMSProfilePtr sRGBProfile;
 #endif
 
-    void setDefaultGrayColorSpace(GfxColorSpace *cs)
-    {
-        defaultGrayColorSpace = cs;
-    }
+    void setDefaultGrayColorSpace(GfxColorSpace *cs) { defaultGrayColorSpace = cs; }
 
-    void setDefaultRGBColorSpace(GfxColorSpace *cs)
-    {
-        defaultRGBColorSpace = cs;
-    }
+    void setDefaultRGBColorSpace(GfxColorSpace *cs) { defaultRGBColorSpace = cs; }
 
-    void setDefaultCMYKColorSpace(GfxColorSpace *cs)
-    {
-        defaultCMYKColorSpace = cs;
-    }
+    void setDefaultCMYKColorSpace(GfxColorSpace *cs) { defaultCMYKColorSpace = cs; }
 
     GfxColorSpace *copyDefaultGrayColorSpace()
     {
@@ -1665,18 +1644,9 @@ public:
     }
 
     // Add to path.
-    void moveTo(double x, double y)
-    {
-        path->moveTo(curX = x, curY = y);
-    }
-    void lineTo(double x, double y)
-    {
-        path->lineTo(curX = x, curY = y);
-    }
-    void curveTo(double x1, double y1, double x2, double y2, double x3, double y3)
-    {
-        path->curveTo(x1, y1, x2, y2, curX = x3, curY = y3);
-    }
+    void moveTo(double x, double y) { path->moveTo(curX = x, curY = y); }
+    void lineTo(double x, double y) { path->lineTo(curX = x, curY = y); }
+    void curveTo(double x1, double y1, double x2, double y2, double x3, double y3) { path->curveTo(x1, y1, x2, y2, curX = x3, curY = y3); }
     void closePath()
     {
         path->close();
@@ -1708,22 +1678,13 @@ public:
     // Push/pop GfxState on/off stack.
     GfxState *save();
     GfxState *restore();
-    bool hasSaves() const
-    {
-        return saved != nullptr;
-    }
-    bool isParentState(GfxState *state)
-    {
-        return saved == state || (saved && saved->isParentState(state));
-    }
+    bool hasSaves() const { return saved != nullptr; }
+    bool isParentState(GfxState *state) { return saved == state || (saved && saved->isParentState(state)); }
 
     // Misc
     bool parseBlendMode(Object *obj, GfxBlendMode *mode);
 
-    ReusablePathIterator *getReusablePath()
-    {
-        return new ReusablePathIterator(path);
-    }
+    ReusablePathIterator *getReusablePath() { return new ReusablePathIterator(path); }
 
 private:
     double hDPI, vDPI; // resolution
diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index ecac32dc..82ac1fd8 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -262,10 +262,7 @@ public:
     void scanWindowsFonts(const std::string &winFontDir);
 #endif
 #ifdef WITH_FONTCONFIGURATION_FONTCONFIG
-    void addFcFont(SysFontInfo *si)
-    {
-        fonts.push_back(si);
-    }
+    void addFcFont(SysFontInfo *si) { fonts.push_back(si); }
 #endif
 private:
 #ifdef _WIN32
@@ -1361,6 +1358,7 @@ const UnicodeMap *GlobalParams::getTextEncoding()
 std::vector<std::string> GlobalParams::getEncodingNames()
 {
     std::vector<std::string> result;
+    result.reserve(residentUnicodeMaps.size() + unicodeMaps.size());
     for (const auto &unicodeMap : residentUnicodeMaps) {
         result.push_back(unicodeMap.first);
     }
diff --git a/poppler/OutputDev.h b/poppler/OutputDev.h
index f9c99a77..67c21618 100644
--- a/poppler/OutputDev.h
+++ b/poppler/OutputDev.h
@@ -173,14 +173,8 @@ public:
     virtual void cvtDevToUser(double dx, double dy, double *ux, double *uy);
     virtual void cvtUserToDev(double ux, double uy, int *dx, int *dy);
 
-    const double *getDefCTM() const
-    {
-        return defCTM;
-    }
-    const double *getDefICTM() const
-    {
-        return defICTM;
-    }
+    const double *getDefCTM() const { return defCTM; }
+    const double *getDefICTM() const { return defICTM; }
 
     //----- save/restore graphics state
     virtual void saveState(GfxState * /*state*/) { }
@@ -240,34 +234,13 @@ public:
     {
         return false;
     }
-    virtual bool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/)
-    {
-        return false;
-    }
-    virtual bool axialShadedFill(GfxState * /*state*/, GfxAxialShading * /*shading*/, double /*tMin*/, double /*tMax*/)
-    {
-        return false;
-    }
-    virtual bool axialShadedSupportExtend(GfxState * /*state*/, GfxAxialShading * /*shading*/)
-    {
-        return false;
-    }
-    virtual bool radialShadedFill(GfxState * /*state*/, GfxRadialShading * /*shading*/, double /*sMin*/, double /*sMax*/)
-    {
-        return false;
-    }
-    virtual bool radialShadedSupportExtend(GfxState * /*state*/, GfxRadialShading * /*shading*/)
-    {
-        return false;
-    }
-    virtual bool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading)
-    {
-        return false;
-    }
-    virtual bool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading)
-    {
-        return false;
-    }
+    virtual bool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/) { return false; }
+    virtual bool axialShadedFill(GfxState * /*state*/, GfxAxialShading * /*shading*/, double /*tMin*/, double /*tMax*/) { return false; }
+    virtual bool axialShadedSupportExtend(GfxState * /*state*/, GfxAxialShading * /*shading*/) { return false; }
+    virtual bool radialShadedFill(GfxState * /*state*/, GfxRadialShading * /*shading*/, double /*sMin*/, double /*sMax*/) { return false; }
+    virtual bool radialShadedSupportExtend(GfxState * /*state*/, GfxRadialShading * /*shading*/) { return false; }
+    virtual bool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) { return false; }
+    virtual bool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) { return false; }
 
     //----- path clipping
 
@@ -356,17 +329,11 @@ public:
 
     //----- Profiling
     void startProfile();
-    std::unordered_map<std::string, ProfileData> *getProfileHash() const
-    {
-        return profileHash.get();
-    }
+    std::unordered_map<std::string, ProfileData> *getProfileHash() const { return profileHash.get(); }
     std::unique_ptr<std::unordered_map<std::string, ProfileData>> endProfile();
 
     //----- transparency groups and soft masks
-    virtual bool checkTransparencyGroup(GfxState * /*state*/, bool /*knockout*/)
-    {
-        return true;
-    }
+    virtual bool checkTransparencyGroup(GfxState * /*state*/, bool /*knockout*/) { return true; }
     virtual void beginTransparencyGroup(GfxState * /*state*/, const double * /*bbox*/, GfxColorSpace * /*blendingColorSpace*/, bool /*isolated*/, bool /*knockout*/, bool /*forSoftMask*/) { }
     virtual void endTransparencyGroup(GfxState * /*state*/) { }
     virtual void paintTransparencyGroup(GfxState * /*state*/, const double * /*bbox*/) { }
@@ -377,51 +344,21 @@ public:
     virtual void processLink(AnnotLink * /*link*/) { }
 
 #if 1 //~tmp: turn off anti-aliasing temporarily
-    virtual bool getVectorAntialias()
-    {
-        return false;
-    }
+    virtual bool getVectorAntialias() { return false; }
     virtual void setVectorAntialias(bool /*vaa*/) { }
 #endif
 
 #ifdef USE_CMS
-    void setDisplayProfile(const GfxLCMSProfilePtr &profile)
-    {
-        displayprofile = profile;
-    }
-    GfxLCMSProfilePtr getDisplayProfile() const
-    {
-        return displayprofile;
-    }
-    void setDefaultGrayProfile(const GfxLCMSProfilePtr &profile)
-    {
-        defaultGrayProfile = profile;
-    }
-    GfxLCMSProfilePtr getDefaultGrayProfile() const
-    {
-        return defaultGrayProfile;
-    }
-    void setDefaultRGBProfile(const GfxLCMSProfilePtr &profile)
-    {
-        defaultRGBProfile = profile;
-    }
-    GfxLCMSProfilePtr getDefaultRGBProfile() const
-    {
-        return defaultRGBProfile;
-    }
-    void setDefaultCMYKProfile(const GfxLCMSProfilePtr &profile)
-    {
-        defaultCMYKProfile = profile;
-    }
-    GfxLCMSProfilePtr getDefaultCMYKProfile() const
-    {
-        return defaultCMYKProfile;
-    }
-
-    PopplerCache<Ref, GfxICCBasedColorSpace> *getIccColorSpaceCache()
-    {
-        return &iccColorSpaceCache;
-    }
+    void setDisplayProfile(const GfxLCMSProfilePtr &profile) { displayprofile = profile; }
+    GfxLCMSProfilePtr getDisplayProfile() const { return displayprofile; }
+    void setDefaultGrayProfile(const GfxLCMSProfilePtr &profile) { defaultGrayProfile = profile; }
+    GfxLCMSProfilePtr getDefaultGrayProfile() const { return defaultGrayProfile; }
+    void setDefaultRGBProfile(const GfxLCMSProfilePtr &profile) { defaultRGBProfile = profile; }
+    GfxLCMSProfilePtr getDefaultRGBProfile() const { return defaultRGBProfile; }
+    void setDefaultCMYKProfile(const GfxLCMSProfilePtr &profile) { defaultCMYKProfile = profile; }
+    GfxLCMSProfilePtr getDefaultCMYKProfile() const { return defaultCMYKProfile; }
+
+    PopplerCache<Ref, GfxICCBasedColorSpace> *getIccColorSpaceCache() { return &iccColorSpaceCache; }
 #endif
 
 private:
diff --git a/poppler/PDFDoc.h b/poppler/PDFDoc.h
index 5aa3c215..c4ab6705 100644
--- a/poppler/PDFDoc.h
+++ b/poppler/PDFDoc.h
@@ -147,34 +147,19 @@ public:
     static std::unique_ptr<PDFDoc> ErrorPDFDoc(int errorCode, std::unique_ptr<GooString> &&fileNameA);
 
     // Was PDF document successfully opened?
-    bool isOk() const
-    {
-        return ok;
-    }
+    bool isOk() const { return ok; }
 
     // Get the error code (if isOk() returns false).
-    int getErrorCode() const
-    {
-        return errCode;
-    }
+    int getErrorCode() const { return errCode; }
 
     // Get the error code returned by fopen() (if getErrorCode() ==
     // errOpenFile).
-    int getFopenErrno() const
-    {
-        return fopenErrno;
-    }
+    int getFopenErrno() const { return fopenErrno; }
 
     // Get file name.
-    const GooString *getFileName() const
-    {
-        return fileName.get();
-    }
+    const GooString *getFileName() const { return fileName.get(); }
 #ifdef _WIN32
-    wchar_t *getFileNameU()
-    {
-        return fileNameU;
-    }
+    wchar_t *getFileNameU() { return fileNameU; }
 #endif
 
     // Get the linearization table.
@@ -182,66 +167,33 @@ public:
     bool checkLinearization();
 
     // Get the xref table.
-    XRef *getXRef() const
-    {
-        return xref;
-    }
+    XRef *getXRef() const { return xref; }
 
     // Get catalog.
-    Catalog *getCatalog() const
-    {
-        return catalog;
-    }
+    Catalog *getCatalog() const { return catalog; }
 
     // Get optional content configuration
-    OCGs *getOptContentConfig() const
-    {
-        return catalog->getOptContentConfig();
-    }
+    OCGs *getOptContentConfig() const { return catalog->getOptContentConfig(); }
 
     // Get base stream.
-    BaseStream *getBaseStream() const
-    {
-        return str;
-    }
+    BaseStream *getBaseStream() const { return str; }
 
     // Get page parameters.
-    double getPageMediaWidth(int page)
-    {
-        return getPage(page) ? getPage(page)->getMediaWidth() : 0.0;
-    }
-    double getPageMediaHeight(int page)
-    {
-        return getPage(page) ? getPage(page)->getMediaHeight() : 0.0;
-    }
-    double getPageCropWidth(int page)
-    {
-        return getPage(page) ? getPage(page)->getCropWidth() : 0.0;
-    }
-    double getPageCropHeight(int page)
-    {
-        return getPage(page) ? getPage(page)->getCropHeight() : 0.0;
-    }
-    int getPageRotate(int page)
-    {
-        return getPage(page) ? getPage(page)->getRotate() : 0;
-    }
+    double getPageMediaWidth(int page) { return getPage(page) ? getPage(page)->getMediaWidth() : 0.0; }
+    double getPageMediaHeight(int page) { return getPage(page) ? getPage(page)->getMediaHeight() : 0.0; }
+    double getPageCropWidth(int page) { return getPage(page) ? getPage(page)->getCropWidth() : 0.0; }
+    double getPageCropHeight(int page) { return getPage(page) ? getPage(page)->getCropHeight() : 0.0; }
+    int getPageRotate(int page) { return getPage(page) ? getPage(page)->getRotate() : 0; }
 
     // Get number of pages.
     int getNumPages();
 
     // Return the contents of the metadata stream, or nullptr if there is
     // no metadata.
-    std::unique_ptr<GooString> readMetadata() const
-    {
-        return catalog->readMetadata();
-    }
+    std::unique_ptr<GooString> readMetadata() const { return catalog->readMetadata(); }
 
     // Return the structure tree root object.
-    const StructTreeRoot *getStructTreeRoot() const
-    {
-        return catalog->getStructTreeRoot();
-    }
+    const StructTreeRoot *getStructTreeRoot() const { return catalog->getStructTreeRoot(); }
 
     // Get page.
     Page *getPage(int page);
@@ -260,10 +212,7 @@ public:
 
     // Find a page, given its object ID.  Returns page number, or 0 if
     // not found.
-    int findPage(const Ref ref)
-    {
-        return catalog->findPage(ref);
-    }
+    int findPage(const Ref ref) { return catalog->findPage(ref); }
 
     // Returns the links for the current page, transferring ownership to
     // the caller.
@@ -271,10 +220,7 @@ public:
 
     // Find a named destination.  Returns the link destination, or
     // nullptr if <name> is not a destination.
-    std::unique_ptr<LinkDest> findDest(const GooString *name)
-    {
-        return catalog->findDest(name);
-    }
+    std::unique_ptr<LinkDest> findDest(const GooString *name) { return catalog->findDest(name); }
 
     // Process the links for a page.
     void processLinks(OutputDev *out, int page);
@@ -283,65 +229,29 @@ public:
     Outline *getOutline();
 
     // Is the file encrypted?
-    bool isEncrypted()
-    {
-        return xref->isEncrypted();
-    }
+    bool isEncrypted() { return xref->isEncrypted(); }
 
     std::vector<FormFieldSignature *> getSignatureFields();
 
     // Check various permissions.
-    bool okToPrint(bool ignoreOwnerPW = false)
-    {
-        return xref->okToPrint(ignoreOwnerPW);
-    }
-    bool okToPrintHighRes(bool ignoreOwnerPW = false)
-    {
-        return xref->okToPrintHighRes(ignoreOwnerPW);
-    }
-    bool okToChange(bool ignoreOwnerPW = false)
-    {
-        return xref->okToChange(ignoreOwnerPW);
-    }
-    bool okToCopy(bool ignoreOwnerPW = false)
-    {
-        return xref->okToCopy(ignoreOwnerPW);
-    }
-    bool okToAddNotes(bool ignoreOwnerPW = false)
-    {
-        return xref->okToAddNotes(ignoreOwnerPW);
-    }
-    bool okToFillForm(bool ignoreOwnerPW = false)
-    {
-        return xref->okToFillForm(ignoreOwnerPW);
-    }
-    bool okToAccessibility(bool ignoreOwnerPW = false)
-    {
-        return xref->okToAccessibility(ignoreOwnerPW);
-    }
-    bool okToAssemble(bool ignoreOwnerPW = false)
-    {
-        return xref->okToAssemble(ignoreOwnerPW);
-    }
+    bool okToPrint(bool ignoreOwnerPW = false) { return xref->okToPrint(ignoreOwnerPW); }
+    bool okToPrintHighRes(bool ignoreOwnerPW = false) { return xref->okToPrintHighRes(ignoreOwnerPW); }
+    bool okToChange(bool ignoreOwnerPW = false) { return xref->okToChange(ignoreOwnerPW); }
+    bool okToCopy(bool ignoreOwnerPW = false) { return xref->okToCopy(ignoreOwnerPW); }
+    bool okToAddNotes(bool ignoreOwnerPW = false) { return xref->okToAddNotes(ignoreOwnerPW); }
+    bool okToFillForm(bool ignoreOwnerPW = false) { return xref->okToFillForm(ignoreOwnerPW); }
+    bool okToAccessibility(bool ignoreOwnerPW = false) { return xref->okToAccessibility(ignoreOwnerPW); }
+    bool okToAssemble(bool ignoreOwnerPW = false) { return xref->okToAssemble(ignoreOwnerPW); }
 
     // Is this document linearized?
     bool isLinearized(bool tryingToReconstruct = false);
 
     // Return the document's Info dictionary (if any).
-    Object getDocInfo()
-    {
-        return xref->getDocInfo();
-    }
-    Object getDocInfoNF()
-    {
-        return xref->getDocInfoNF();
-    }
+    Object getDocInfo() { return xref->getDocInfo(); }
+    Object getDocInfoNF() { return xref->getDocInfoNF(); }
 
     // Remove the document's Info dictionary and update the trailer dictionary.
-    void removeDocInfo()
-    {
-        xref->removeDocInfo();
-    }
+    void removeDocInfo() { xref->removeDocInfo(); }
 
     // Set doc info string entry. nullptr or empty value will cause a removal.
     // Takes ownership of value.
@@ -350,95 +260,35 @@ public:
     // Set document's properties in document's Info dictionary.
     // nullptr or empty value will cause a removal.
     // Takes ownership of value.
-    void setDocInfoTitle(GooString *title)
-    {
-        setDocInfoStringEntry("Title", title);
-    }
-    void setDocInfoAuthor(GooString *author)
-    {
-        setDocInfoStringEntry("Author", author);
-    }
-    void setDocInfoSubject(GooString *subject)
-    {
-        setDocInfoStringEntry("Subject", subject);
-    }
-    void setDocInfoKeywords(GooString *keywords)
-    {
-        setDocInfoStringEntry("Keywords", keywords);
-    }
-    void setDocInfoCreator(GooString *creator)
-    {
-        setDocInfoStringEntry("Creator", creator);
-    }
-    void setDocInfoProducer(GooString *producer)
-    {
-        setDocInfoStringEntry("Producer", producer);
-    }
-    void setDocInfoCreatDate(GooString *creatDate)
-    {
-        setDocInfoStringEntry("CreationDate", creatDate);
-    }
-    void setDocInfoModDate(GooString *modDate)
-    {
-        setDocInfoStringEntry("ModDate", modDate);
-    }
+    void setDocInfoTitle(GooString *title) { setDocInfoStringEntry("Title", title); }
+    void setDocInfoAuthor(GooString *author) { setDocInfoStringEntry("Author", author); }
+    void setDocInfoSubject(GooString *subject) { setDocInfoStringEntry("Subject", subject); }
+    void setDocInfoKeywords(GooString *keywords) { setDocInfoStringEntry("Keywords", keywords); }
+    void setDocInfoCreator(GooString *creator) { setDocInfoStringEntry("Creator", creator); }
+    void setDocInfoProducer(GooString *producer) { setDocInfoStringEntry("Producer", producer); }
+    void setDocInfoCreatDate(GooString *creatDate) { setDocInfoStringEntry("CreationDate", creatDate); }
+    void setDocInfoModDate(GooString *modDate) { setDocInfoStringEntry("ModDate", modDate); }
 
     // Get document's properties from document's Info dictionary.
     // Returns nullptr on fail.
     std::unique_ptr<GooString> getDocInfoStringEntry(const char *key);
 
-    std::unique_ptr<GooString> getDocInfoTitle()
-    {
-        return getDocInfoStringEntry("Title");
-    }
-    std::unique_ptr<GooString> getDocInfoAuthor()
-    {
-        return getDocInfoStringEntry("Author");
-    }
-    std::unique_ptr<GooString> getDocInfoSubject()
-    {
-        return getDocInfoStringEntry("Subject");
-    }
-    std::unique_ptr<GooString> getDocInfoKeywords()
-    {
-        return getDocInfoStringEntry("Keywords");
-    }
-    std::unique_ptr<GooString> getDocInfoCreator()
-    {
-        return getDocInfoStringEntry("Creator");
-    }
-    std::unique_ptr<GooString> getDocInfoProducer()
-    {
-        return getDocInfoStringEntry("Producer");
-    }
-    std::unique_ptr<GooString> getDocInfoCreatDate()
-    {
-        return getDocInfoStringEntry("CreationDate");
-    }
-    std::unique_ptr<GooString> getDocInfoModDate()
-    {
-        return getDocInfoStringEntry("ModDate");
-    }
+    std::unique_ptr<GooString> getDocInfoTitle() { return getDocInfoStringEntry("Title"); }
+    std::unique_ptr<GooString> getDocInfoAuthor() { return getDocInfoStringEntry("Author"); }
+    std::unique_ptr<GooString> getDocInfoSubject() { return getDocInfoStringEntry("Subject"); }
+    std::unique_ptr<GooString> getDocInfoKeywords() { return getDocInfoStringEntry("Keywords"); }
+    std::unique_ptr<GooString> getDocInfoCreator() { return getDocInfoStringEntry("Creator"); }
+    std::unique_ptr<GooString> getDocInfoProducer() { return getDocInfoStringEntry("Producer"); }
+    std::unique_ptr<GooString> getDocInfoCreatDate() { return getDocInfoStringEntry("CreationDate"); }
+    std::unique_ptr<GooString> getDocInfoModDate() { return getDocInfoStringEntry("ModDate"); }
 
     // Return the PDF subtype, part, and conformance
-    PDFSubtype getPDFSubtype() const
-    {
-        return pdfSubtype;
-    }
-    PDFSubtypePart getPDFSubtypePart() const
-    {
-        return pdfPart;
-    }
-    PDFSubtypeConformance getPDFSubtypeConformance() const
-    {
-        return pdfConformance;
-    }
+    PDFSubtype getPDFSubtype() const { return pdfSubtype; }
+    PDFSubtypePart getPDFSubtypePart() const { return pdfPart; }
+    PDFSubtypeConformance getPDFSubtypeConformance() const { return pdfConformance; }
 
     // Return the PDF version specified by the file (either header or catalog).
-    int getPDFMajorVersion() const
-    {
-        return std::max(headerPdfMajorVersion, catalog->getPDFMajorVersion());
-    }
+    int getPDFMajorVersion() const { return std::max(headerPdfMajorVersion, catalog->getPDFMajorVersion()); }
     int getPDFMinorVersion() const
     {
         const int catalogMajorVersion = catalog->getPDFMajorVersion();
@@ -466,10 +316,7 @@ public:
     int saveWithoutChangesAs(OutStream *outStr);
 
     // Return a pointer to the GUI (XPDFCore or WinPDFCore object).
-    void *getGUIData()
-    {
-        return guiData;
-    }
+    void *getGUIData() { return guiData; }
 
     // rewrite pageDict with MediaBox, CropBox and new page CTM
     bool replacePageDict(int pageNo, int rotate, const PDFRectangle *mediaBox, const PDFRectangle *cropBox);
@@ -510,10 +357,7 @@ private:
     {
         writeObject(obj, outStr, getXRef(), 0, fileKey, encAlgorithm, keyLength, { objNum, objGen });
     }
-    inline void writeObject(Object *obj, OutStream *outStr, unsigned char *fileKey, CryptAlgorithm encAlgorithm, int keyLength, Ref ref)
-    {
-        writeObject(obj, outStr, getXRef(), 0, fileKey, encAlgorithm, keyLength, ref);
-    }
+    inline void writeObject(Object *obj, OutStream *outStr, unsigned char *fileKey, CryptAlgorithm encAlgorithm, int keyLength, Ref ref) { writeObject(obj, outStr, getXRef(), 0, fileKey, encAlgorithm, keyLength, ref); }
     static void writeStream(Stream *str, OutStream *outStr);
     static void writeRawStream(Stream *str, OutStream *outStr);
     void writeXRefTableTrailer(Goffset uxrefOffset, XRef *uxref, bool writeAllEntries, int uxrefSize, OutStream *outStr, bool incrUpdate);
diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h
index dfb4ad83..76d72396 100644
--- a/poppler/PSOutputDev.h
+++ b/poppler/PSOutputDev.h
@@ -286,10 +286,7 @@ public:
         xScale0 = x;
         yScale0 = y;
     }
-    void setRotate(int rotateA)
-    {
-        rotate0 = rotateA;
-    }
+    void setRotate(int rotateA) { rotate0 = rotateA; }
     void setClip(double llx, double lly, double urx, double ury)
     {
         clipLLX0 = llx;
@@ -307,82 +304,31 @@ public:
         overlayCbk = cbk;
         overlayCbkData = data;
     }
-    void setDisplayText(bool display)
-    {
-        displayText = display;
-    }
+    void setDisplayText(bool display) { displayText = display; }
 
-    void setPSCenter(bool center)
-    {
-        psCenter = center;
-    }
-    void setPSExpandSmaller(bool expand)
-    {
-        psExpandSmaller = expand;
-    }
-    void setPSShrinkLarger(bool shrink)
-    {
-        psShrinkLarger = shrink;
-    }
-    void setOverprintPreview(bool overprintPreviewA)
-    {
-        overprintPreview = overprintPreviewA;
-    }
-    void setRasterAntialias(bool a)
-    {
-        rasterAntialias = a;
-    }
-    void setForceRasterize(PSForceRasterize f)
-    {
-        forceRasterize = f;
-    }
-    void setRasterResolution(double r)
-    {
-        rasterResolution = r;
-    }
+    void setPSCenter(bool center) { psCenter = center; }
+    void setPSExpandSmaller(bool expand) { psExpandSmaller = expand; }
+    void setPSShrinkLarger(bool shrink) { psShrinkLarger = shrink; }
+    void setOverprintPreview(bool overprintPreviewA) { overprintPreview = overprintPreviewA; }
+    void setRasterAntialias(bool a) { rasterAntialias = a; }
+    void setForceRasterize(PSForceRasterize f) { forceRasterize = f; }
+    void setRasterResolution(double r) { rasterResolution = r; }
     void setRasterMono(bool b)
     {
         processColorFormat = splashModeMono8;
         processColorFormatSpecified = true;
     }
 
-    void setUncompressPreloadedImages(bool b)
-    {
-        uncompressPreloadedImages = b;
-    }
+    void setUncompressPreloadedImages(bool b) { uncompressPreloadedImages = b; }
 
-    bool getEmbedType1() const
-    {
-        return embedType1;
-    }
-    bool getEmbedTrueType() const
-    {
-        return embedTrueType;
-    }
-    bool getEmbedCIDPostScript() const
-    {
-        return embedCIDPostScript;
-    }
-    bool getEmbedCIDTrueType() const
-    {
-        return embedCIDTrueType;
-    }
-    bool getFontPassthrough() const
-    {
-        return fontPassthrough;
-    }
-    bool getOptimizeColorSpace() const
-    {
-        return optimizeColorSpace;
-    }
-    bool getPassLevel1CustomColor() const
-    {
-        return passLevel1CustomColor;
-    }
-    bool getEnableLZW() const
-    {
-        return enableLZW;
-    };
+    bool getEmbedType1() const { return embedType1; }
+    bool getEmbedTrueType() const { return embedTrueType; }
+    bool getEmbedCIDPostScript() const { return embedCIDPostScript; }
+    bool getEmbedCIDTrueType() const { return embedCIDTrueType; }
+    bool getFontPassthrough() const { return fontPassthrough; }
+    bool getOptimizeColorSpace() const { return optimizeColorSpace; }
+    bool getPassLevel1CustomColor() const { return passLevel1CustomColor; }
+    bool getEnableLZW() const { return enableLZW; };
     bool getEnableFlate() const
 #ifdef ENABLE_ZLIB
     {
@@ -393,58 +339,19 @@ public:
         return false;
     }
 #endif
-    void setEmbedType1(bool b)
-    {
-        embedType1 = b;
-    }
-    void setEmbedTrueType(bool b)
-    {
-        embedTrueType = b;
-    }
-    void setEmbedCIDPostScript(bool b)
-    {
-        embedCIDPostScript = b;
-    }
-    void setEmbedCIDTrueType(bool b)
-    {
-        embedCIDTrueType = b;
-    }
-    void setFontPassthrough(bool b)
-    {
-        fontPassthrough = b;
-    }
-    void setOptimizeColorSpace(bool b)
-    {
-        optimizeColorSpace = b;
-    }
-    void setPassLevel1CustomColor(bool b)
-    {
-        passLevel1CustomColor = b;
-    }
-    void setPreloadImagesForms(bool b)
-    {
-        preloadImagesForms = b;
-    }
-    void setGenerateOPI(bool b)
-    {
-        generateOPI = b;
-    }
-    void setUseASCIIHex(bool b)
-    {
-        useASCIIHex = b;
-    }
-    void setUseBinary(bool b)
-    {
-        useBinary = b;
-    }
-    void setEnableLZW(bool b)
-    {
-        enableLZW = b;
-    }
-    void setEnableFlate(bool b)
-    {
-        enableFlate = b;
-    }
+    void setEmbedType1(bool b) { embedType1 = b; }
+    void setEmbedTrueType(bool b) { embedTrueType = b; }
+    void setEmbedCIDPostScript(bool b) { embedCIDPostScript = b; }
+    void setEmbedCIDTrueType(bool b) { embedCIDTrueType = b; }
+    void setFontPassthrough(bool b) { fontPassthrough = b; }
+    void setOptimizeColorSpace(bool b) { optimizeColorSpace = b; }
+    void setPassLevel1CustomColor(bool b) { passLevel1CustomColor = b; }
+    void setPreloadImagesForms(bool b) { preloadImagesForms = b; }
+    void setGenerateOPI(bool b) { generateOPI = b; }
+    void setUseASCIIHex(bool b) { useASCIIHex = b; }
+    void setUseBinary(bool b) { useBinary = b; }
+    void setEnableLZW(bool b) { enableLZW = b; }
+    void setEnableFlate(bool b) { enableFlate = b; }
 
     void setProcessColorFormat(SplashColorMode format)
     {
diff --git a/poppler/SplashOutputDev.h b/poppler/SplashOutputDev.h
index 04614124..88b13b42 100644
--- a/poppler/SplashOutputDev.h
+++ b/poppler/SplashOutputDev.h
@@ -341,20 +341,11 @@ public:
     void setVectorAntialias(bool vaa) override;
 #endif
 
-    bool getFontAntialias()
-    {
-        return fontAntialias;
-    }
-    void setFontAntialias(bool anti)
-    {
-        fontAntialias = anti;
-    }
+    bool getFontAntialias() { return fontAntialias; }
+    void setFontAntialias(bool anti) { fontAntialias = anti; }
 
     void setFreeTypeHinting(bool enable, bool enableSlightHinting);
-    void setEnableFreeType(bool enable)
-    {
-        enableFreeType = enable;
-    }
+    void setEnableFreeType(bool enable) { enableFreeType = enable; }
 
 protected:
     void doUpdateFont(GfxState *state);
diff --git a/poppler/TextOutputDev.h b/poppler/TextOutputDev.h
index 5e53bf7a..af007fa0 100644
--- a/poppler/TextOutputDev.h
+++ b/poppler/TextOutputDev.h
@@ -108,32 +108,14 @@ public:
 
 #ifdef TEXTOUT_WORD_LIST
     // Get the font name (which may be NULL).
-    const GooString *getFontName() const
-    {
-        return fontName;
-    }
+    const GooString *getFontName() const { return fontName; }
 
     // Get font descriptor flags.
-    bool isFixedWidth() const
-    {
-        return flags & fontFixedWidth;
-    }
-    bool isSerif() const
-    {
-        return flags & fontSerif;
-    }
-    bool isSymbolic() const
-    {
-        return flags & fontSymbolic;
-    }
-    bool isItalic() const
-    {
-        return flags & fontItalic;
-    }
-    bool isBold() const
-    {
-        return flags & fontBold;
-    }
+    bool isFixedWidth() const { return flags & fontFixedWidth; }
+    bool isSerif() const { return flags & fontSerif; }
+    bool isSymbolic() const { return flags & fontSymbolic; }
+    bool isItalic() const { return flags & fontItalic; }
+    bool isBold() const { return flags & fontBold; }
 #endif
 
 private:
@@ -195,19 +177,10 @@ public:
     const TextWord *getNext() const { return next; }
 
 #ifdef TEXTOUT_WORD_LIST
-    int getLength() const
-    {
-        return len;
-    }
-    const Unicode *getChar(int idx) const
-    {
-        return &text[idx];
-    }
+    int getLength() const { return len; }
+    const Unicode *getChar(int idx) const { return &text[idx]; }
     GooString *getText() const;
-    const GooString *getFontName(int idx) const
-    {
-        return font[idx]->fontName;
-    }
+    const GooString *getFontName(int idx) const { return font[idx]->fontName; }
     void getColor(double *r, double *g, double *b) const
     {
         *r = colorR;
@@ -222,51 +195,18 @@ public:
         *yMaxA = yMax;
     }
     void getCharBBox(int charIdx, double *xMinA, double *yMinA, double *xMaxA, double *yMaxA) const;
-    double getFontSize() const
-    {
-        return fontSize;
-    }
-    int getRotation() const
-    {
-        return rot;
-    }
-    int getCharPos() const
-    {
-        return charPos[0];
-    }
-    int getCharLen() const
-    {
-        return charPos[len] - charPos[0];
-    }
-    bool getSpaceAfter() const
-    {
-        return spaceAfter;
-    }
+    double getFontSize() const { return fontSize; }
+    int getRotation() const { return rot; }
+    int getCharPos() const { return charPos[0]; }
+    int getCharLen() const { return charPos[len] - charPos[0]; }
+    bool getSpaceAfter() const { return spaceAfter; }
 #endif
-    bool isUnderlined() const
-    {
-        return underlined;
-    }
-    const AnnotLink *getLink() const
-    {
-        return link;
-    }
-    double getEdge(int i) const
-    {
-        return edge[i];
-    }
-    double getBaseline() const
-    {
-        return base;
-    }
-    bool hasSpaceAfter() const
-    {
-        return spaceAfter;
-    }
-    const TextWord *nextWord() const
-    {
-        return next;
-    };
+    bool isUnderlined() const { return underlined; }
+    const AnnotLink *getLink() const { return link; }
+    double getEdge(int i) const { return edge[i]; }
+    double getBaseline() const { return base; }
+    bool hasSpaceAfter() const { return spaceAfter; }
+    const TextWord *nextWord() const { return next; };
 
 private:
     void ensureCapacity(int capacity);
@@ -932,10 +872,7 @@ public:
     TextPage *takeText();
 
     // Turn extra processing for HTML conversion on or off.
-    void enableHTMLExtras(bool doHTMLA)
-    {
-        doHTML = doHTMLA;
-    }
+    void enableHTMLExtras(bool doHTMLA) { doHTML = doHTMLA; }
 
     // Get the head of the linked list of TextFlows for the
     // last rasterized page.
@@ -949,22 +886,10 @@ public:
         return eolUnix;
 #endif
     }
-    void setTextEOL(EndOfLineKind textEOLA)
-    {
-        textEOL = textEOLA;
-    }
-    void setTextPageBreaks(bool textPageBreaksA)
-    {
-        textPageBreaks = textPageBreaksA;
-    }
-    double getMinColSpacing1() const
-    {
-        return minColSpacing1;
-    }
-    void setMinColSpacing1(double val)
-    {
-        minColSpacing1 = val;
-    }
+    void setTextEOL(EndOfLineKind textEOLA) { textEOL = textEOLA; }
+    void setTextPageBreaks(bool textPageBreaksA) { textPageBreaks = textPageBreaksA; }
+    double getMinColSpacing1() const { return minColSpacing1; }
+    void setMinColSpacing1(double val) { minColSpacing1 = val; }
 
 private:
     TextOutputFunc outputFunc; // output function
diff --git a/qt5/src/poppler-private.h b/qt5/src/poppler-private.h
index f94e6541..39dfb6b0 100644
--- a/qt5/src/poppler-private.h
+++ b/qt5/src/poppler-private.h
@@ -143,10 +143,7 @@ public:
 
     void addTocChildren(QDomDocument *docSyn, QDomNode *parent, const std::vector<::OutlineItem *> *items);
 
-    void setPaperColor(const QColor &color)
-    {
-        paperColor = color;
-    }
+    void setPaperColor(const QColor &color) { paperColor = color; }
 
     void fillMembers()
     {
diff --git a/qt6/src/poppler-private.h b/qt6/src/poppler-private.h
index 45ed4b41..d1f73353 100644
--- a/qt6/src/poppler-private.h
+++ b/qt6/src/poppler-private.h
@@ -140,10 +140,7 @@ public:
     DocumentData(const DocumentData &) = delete;
     DocumentData &operator=(const DocumentData &) = delete;
 
-    void setPaperColor(const QColor &color)
-    {
-        paperColor = color;
-    }
+    void setPaperColor(const QColor &color) { paperColor = color; }
 
     void fillMembers()
     {
diff --git a/splash/Splash.h b/splash/Splash.h
index 66167510..e13be54c 100644
--- a/splash/Splash.h
+++ b/splash/Splash.h
@@ -242,18 +242,9 @@ public:
     void setDebugMode(bool debugModeA) { debugMode = debugModeA; }
 
 #if 1 //~tmp: turn off anti-aliasing temporarily
-    void setInShading(bool sh)
-    {
-        inShading = sh;
-    }
-    bool getVectorAntialias()
-    {
-        return vectorAntialias;
-    }
-    void setVectorAntialias(bool vaa)
-    {
-        vectorAntialias = vaa;
-    }
+    void setInShading(bool sh) { inShading = sh; }
+    bool getVectorAntialias() { return vectorAntialias; }
+    void setVectorAntialias(bool vaa) { vectorAntialias = vaa; }
 #endif
 
     // Do shaded fills with dynamic patterns
diff --git a/test/cairo-thread-test.cc b/test/cairo-thread-test.cc
index 46e08ed3..922ed813 100644
--- a/test/cairo-thread-test.cc
+++ b/test/cairo-thread-test.cc
@@ -490,7 +490,7 @@ int main(int argc, char *argv[])
     std::vector<std::thread> threads;
     threads.reserve(4);
     for (int i = 0; i < numThreads; i++) {
-        threads.emplace_back(std::thread(runThread, jobQueue));
+        threads.emplace_back(runThread, jobQueue);
     }
 
     std::vector<InputFile> inputFiles;
diff --git a/test/perf-test.cc b/test/perf-test.cc
index 3dda7a2a..dcecfd7a 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -35,7 +35,7 @@
 // before it's tested. This is desired if a file is on a slow drive.
 // Currently copying only works on Windows.
 // Not enabled by default.
-//#define COPY_FILE 1
+// #define COPY_FILE 1
 
 #include <cassert>
 #include <cstdio>
diff --git a/utils/InMemoryFile.h b/utils/InMemoryFile.h
index f4fcb27f..a578f524 100644
--- a/utils/InMemoryFile.h
+++ b/utils/InMemoryFile.h
@@ -50,10 +50,7 @@ public:
      * and must be fclosed() by the caller before destruction. */
     FILE *open(const char *mode);
 
-    const std::vector<char> &getBuffer() const
-    {
-        return data;
-    }
+    const std::vector<char> &getBuffer() const { return data; }
 };
 
 #endif // IN_MEMORY_FILE_H


More information about the poppler mailing list