summaryrefslogtreecommitdiff
path: root/poppler/SplashOutputDev.cc
diff options
context:
space:
mode:
authorOliver Sander <oliver.sander@tu-dresden.de>2022-08-07 10:49:00 +0200
committerAlbert Astals Cid <tsdgeos@yahoo.es>2022-08-08 22:27:58 +0000
commitc9c5eb782a8820f328dc32bcaf74d7f0b2cb6d7a (patch)
tree6ef393035ba0171734267a630b43b9c8b309144b /poppler/SplashOutputDev.cc
parentb8aaf51d69938412f9cca215d3825f53931706d6 (diff)
Use std::vector to store dash patterns
Makes the code more readable.
Diffstat (limited to 'poppler/SplashOutputDev.cc')
-rw-r--r--poppler/SplashOutputDev.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index ac96db02..58e27896 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -1471,15 +1471,12 @@ void SplashOutputDev::updateCTM(GfxState *state, double m11, double m12, double
void SplashOutputDev::updateLineDash(GfxState *state)
{
- double *dashPattern;
- int dashLength;
double dashStart;
- int i;
- state->getLineDash(&dashPattern, &dashLength, &dashStart);
+ const std::vector<double> &dashPattern = state->getLineDash(&dashStart);
- std::vector<SplashCoord> dash(dashLength);
- for (i = 0; i < dashLength; ++i) {
+ std::vector<SplashCoord> dash(dashPattern.size());
+ for (std::vector<double>::size_type i = 0; i < dashPattern.size(); ++i) {
dash[i] = (SplashCoord)dashPattern[i];
if (dash[i] < 0) {
dash[i] = 0;