[graphics/digikam] core/dplugins/generic/tools/printcreator/manager: cppcheck++: constify

Gilles Caulier <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit f1fb2ac00a9da4aa930a70314035537292c083a8 by Gilles Caulier.
Committed on 09/08/2026 at 21:53.
Pushed by cgilles into branch 'master'.

cppcheck++: constify

M  +5    -5    core/dplugins/generic/tools/printcreator/manager/advprintsettings.cpp

https://invent.kde.org/graphics/digikam/-/commit/f1fb2ac00a9da4aa930a70314035537292c083a8

diff --git a/core/dplugins/generic/tools/printcreator/manager/advprintsettings.cpp b/core/dplugins/generic/tools/printcreator/manager/advprintsettings.cpp
index 9d2fbe60c4..21b10686ca 100644
--- a/core/dplugins/generic/tools/printcreator/manager/advprintsettings.cpp
+++ b/core/dplugins/generic/tools/printcreator/manager/advprintsettings.cpp
@@ -157,17 +157,17 @@ QMap<AdvPrintSettings::CaptionType, QString> AdvPrintSettings::captionTypeNames(
 
 QRect* AdvPrintSettings::getLayout(int photoIndex, int sizeIndex) const
 {
-    AdvPrintPhotoSize* const s = photosizes.at(sizeIndex);
+    const AdvPrintPhotoSize* const s = photosizes.at(sizeIndex);
 
     // how many photos would actually be printed, including copies?
 
-    int photoCount             = (photoIndex + 1);
+    int photoCount                   = (photoIndex + 1);
 
     // how many pages?  Recall that the first layout item is the paper size
 
-    int photosPerPage          = s->m_layouts.count() - 1;
-    int remainder              = photoCount % photosPerPage;
-    int retVal                 = (remainder == 0) ? photosPerPage : remainder;
+    int photosPerPage               = (s->m_layouts.count() - 1);
+    int remainder                   = (photoCount % photosPerPage);
+    int retVal                      = ((remainder == 0) ? photosPerPage : remainder);
 
     return s->m_layouts.at(retVal);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.