mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
GIT_SILENT: we can use std::as_const directly
This commit is contained in:
parent
abd550c60c
commit
1080976abe
@ -225,7 +225,7 @@ bool SoftimagePICHandler::read(QImage *image)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QImage::Format fmt = QImage::Format_RGB32;
|
QImage::Format fmt = QImage::Format_RGB32;
|
||||||
for (const PicChannel &channel : qAsConst(m_channels)) {
|
for (const PicChannel &channel : std::as_const(m_channels)) {
|
||||||
if (channel.size != 8) {
|
if (channel.size != 8) {
|
||||||
// we cannot read images that do not come in bytes
|
// we cannot read images that do not come in bytes
|
||||||
qDebug() << "Channel size was" << channel.size;
|
qDebug() << "Channel size was" << channel.size;
|
||||||
@ -404,7 +404,7 @@ QVariant SoftimagePICHandler::option(ImageOption option) const
|
|||||||
return QString();
|
return QString();
|
||||||
case ImageFormat:
|
case ImageFormat:
|
||||||
if (const_cast<SoftimagePICHandler *>(this)->readChannels()) {
|
if (const_cast<SoftimagePICHandler *>(this)->readChannels()) {
|
||||||
for (const PicChannel &channel : qAsConst(m_channels)) {
|
for (const PicChannel &channel : std::as_const(m_channels)) {
|
||||||
if (channel.code & ALPHA) {
|
if (channel.code & ALPHA) {
|
||||||
return QImage::Format_ARGB32;
|
return QImage::Format_ARGB32;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user