diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-09-02 10:46:01 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-09-02 19:06:49 +0200 |
commit | 23c1b132b1727caee1a4891c34ef27e3a5697df5 (patch) | |
tree | 30215a72b98ec65e8bd90a237c57e6404560f2c4 /src/gui/text/qtextformat.cpp | |
parent | 3ded19c86560117a2a04e04b8944ebee4a82081d (diff) |
QPdf: Extract Method is_monochrome()
The old code repeatedly evaluated QImage::colorTable(), which returns
a vector by value.
Instead, factor the checks performed on the color table into
a helper function and pass the color table to it, reducing
the number of evaluations from three to one.
Also makes the code more readable, because the condition now
fits on a single line.
Change-Id: I82773c235047e76b87c8a9d630f7df9440430351
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'src/gui/text/qtextformat.cpp')
0 files changed, 0 insertions, 0 deletions