mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-11-18 12:08:48 -05:00
Make deviceRead function inline
Solves `defined but not used` in sources including util_p.h
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include <QIODevice>
|
||||
#include <QImage>
|
||||
#include <QImageIOHandler>
|
||||
#include <QImageReader>
|
||||
#include <QIODevice>
|
||||
#include <QPixelFormat>
|
||||
|
||||
// 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
|
||||
*/
|
||||
enum class ImageInitToZero
|
||||
{
|
||||
enum class ImageInitToZero {
|
||||
None, /**< Do not initialize the image. */
|
||||
All, /**< Initialize all images. */
|
||||
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.
|
||||
* \return The byte array read.
|
||||
*/
|
||||
static QByteArray deviceRead(QIODevice *d, qint64 maxSize)
|
||||
inline QByteArray deviceRead(QIODevice *d, qint64 maxSize)
|
||||
{
|
||||
if (d == nullptr) {
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user