Make deviceRead function inline

Solves `defined but not used` in sources including util_p.h
This commit is contained in:
Daniel Novomeský
2026-11-12 18:30:12 +01:00
parent 7f260d005f
commit 53366e32ec
+3 -4
View File
@@ -10,10 +10,10 @@
#include <limits> #include <limits>
#include <QIODevice>
#include <QImage> #include <QImage>
#include <QImageIOHandler> #include <QImageIOHandler>
#include <QImageReader> #include <QImageReader>
#include <QIODevice>
#include <QPixelFormat> #include <QPixelFormat>
// Default maximum number of channels (do not exceed 256). // Default maximum number of channels (do not exceed 256).
@@ -86,8 +86,7 @@ static constexpr int kMaxQVectorSize = std::numeric_limits<int>::max() - 32;
/*! /*!
* \brief The ImageInitToZero enum * \brief The ImageInitToZero enum
*/ */
enum class ImageInitToZero enum class ImageInitToZero {
{
None, /**< Do not initialize the image. */ None, /**< Do not initialize the image. */
All, /**< Initialize all images. */ All, /**< Initialize all images. */
PremulOnly, /**< Initialize only images with premultiplied alpha. */ PremulOnly, /**< Initialize only images with premultiplied alpha. */
@@ -306,7 +305,7 @@ inline float fppm2dpi(qint32 ppm, bool *ok = nullptr)
* \param maxSize The maximum size to read. * \param maxSize The maximum size to read.
* \return The byte array read. * \return The byte array read.
*/ */
static QByteArray deviceRead(QIODevice *d, qint64 maxSize) inline QByteArray deviceRead(QIODevice *d, qint64 maxSize)
{ {
if (d == nullptr) { if (d == nullptr) {
return {}; return {};