goo/GooString.h | 2 +- poppler/GfxState.cc | 8 ++++---- poppler/ImageEmbeddingUtils.cc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 9037292ae440fdb959252264da7cd58db16322c0 Author: Albert Astals Cid <[email protected]> Date: Sat Apr 2 00:25:38 2022 +0200 No reason to limit how much we can append in GooString::append diff --git a/goo/GooString.h b/goo/GooString.h index 2b93915f..e09875e6 100644 --- a/goo/GooString.h +++ b/goo/GooString.h @@ -183,7 +183,7 @@ public: static_cast<std::string &>(*this).append(str); return this; } - GooString *append(const char *str, int lengthA) + GooString *append(const char *str, size_t lengthA) { static_cast<std::string &>(*this).append(str, lengthA); return this; commit da5040330f6cdf4aaf88bddd125be22bebb4d214 Author: Albert Astals Cid <[email protected]> Date: Sat Apr 2 00:24:41 2022 +0200 Fix MSVC warning diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc index 51cc9755..e2065a06 100644 --- a/poppler/GfxState.cc +++ b/poppler/GfxState.cc @@ -16,7 +16,7 @@ // Copyright (C) 2005 Kristian Høgsberg <[email protected]> // Copyright (C) 2006, 2007 Jeff Muizelaar <[email protected]> // Copyright (C) 2006, 2010 Carlos Garcia Campos <[email protected]> -// Copyright (C) 2006-2021 Albert Astals Cid <[email protected]> +// Copyright (C) 2006-2022 Albert Astals Cid <[email protected]> // Copyright (C) 2009, 2012 Koji Otani <[email protected]> // Copyright (C) 2009, 2011-2016, 2020 Thomas Freitag <[email protected]> // Copyright (C) 2009, 2019 Christian Persch <[email protected]> @@ -3805,11 +3805,11 @@ int GfxUnivariateShading::getColor(double t, GfxColor *color) if (cacheBounds[lastMatch - 1] >= t) { upper = std::lower_bound(cacheBounds, cacheBounds + lastMatch - 1, t); - lastMatch = upper - cacheBounds; + lastMatch = static_cast<int>(upper - cacheBounds); lastMatch = std::min<int>(std::max<int>(1, lastMatch), cacheSize - 1); } else if (cacheBounds[lastMatch] < t) { upper = std::lower_bound(cacheBounds + lastMatch + 1, cacheBounds + cacheSize, t); - lastMatch = upper - cacheBounds; + lastMatch = static_cast<int>(upper - cacheBounds); lastMatch = std::min<int>(std::max<int>(1, lastMatch), cacheSize - 1); } @@ -3855,7 +3855,7 @@ void GfxUnivariateShading::setupCache(const Matrix *ctm, double xMin, double yMi getParameterRange(&sMin, &sMax, xMin, yMin, xMax, yMax); upperBound = ctm->norm() * getDistance(sMin, sMax); - maxSize = ceil(upperBound); + maxSize = static_cast<int>(ceil(upperBound)); maxSize = std::max<int>(maxSize, 2); { diff --git a/poppler/ImageEmbeddingUtils.cc b/poppler/ImageEmbeddingUtils.cc index 873a7d51..0c13fe96 100644 --- a/poppler/ImageEmbeddingUtils.cc +++ b/poppler/ImageEmbeddingUtils.cc @@ -377,7 +377,7 @@ Ref embed(XRef *xref, const GooFile &imageFile) return Ref::INVALID(); } std::unique_ptr<uint8_t[]> fileContent = std::make_unique<uint8_t[]>(fileSize); - const int bytesRead = imageFile.read((char *)fileContent.get(), fileSize, 0); + const int bytesRead = imageFile.read((char *)fileContent.get(), static_cast<int>(fileSize), 0); if ((bytesRead != fileSize) || (fileSize < MAX_MAGIC_NUM_SIZE)) { error(errIO, -1, "Couldn't load the image file"); return Ref::INVALID();
