From d0e3010d187e074f378f85b9cfcf68f944e1ab45 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 30 Oct 2021 14:30:16 +1100 Subject: Minor changes to avoid warnings from linters. --- src/XPM.cxx | 18 +++++++++--------- src/XPM.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/XPM.cxx b/src/XPM.cxx index 39a283b18..71dbc624e 100644 --- a/src/XPM.cxx +++ b/src/XPM.cxx @@ -99,7 +99,7 @@ void XPM::Init(const char *textForm) { // Build the lines form out of the text form std::vector linesForm = LinesFormFromTextForm(textForm); if (!linesForm.empty()) { - Init(&linesForm[0]); + Init(linesForm.data()); } } else { // It is really in line form @@ -143,7 +143,7 @@ void XPM::Init(const char *const *linesForm) { colourCodeTable[static_cast(code)] = colour; } - for (int y=0; y> &image : images) { if (height < image.second->GetHeight()) { @@ -309,7 +309,7 @@ int RGBAImageSet::GetHeight() const { } /// Give the largest width of the set. -int RGBAImageSet::GetWidth() const { +int RGBAImageSet::GetWidth() const noexcept { if (width < 0) { for (const std::pair> &image : images) { if (width < image.second->GetWidth()) { diff --git a/src/XPM.h b/src/XPM.h index a87d93f36..31753da18 100644 --- a/src/XPM.h +++ b/src/XPM.h @@ -76,9 +76,9 @@ public: /// Get image by id. RGBAImage *Get(int ident); /// Give the largest height of the set. - int GetHeight() const; + int GetHeight() const noexcept; /// Give the largest width of the set. - int GetWidth() const; + int GetWidth() const noexcept; }; } -- cgit v1.2.3