Merge pull request #7257 from Beep6581/fix-warnings-5.12

Compiler warning fixes
This commit is contained in:
Lawrence37
2024-12-26 22:26:11 -08:00
committed by GitHub
20 changed files with 184 additions and 137 deletions

View File

@@ -87,7 +87,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromIcon(const Glib::u
// Create surface from corresponding icon
const auto pos = iconPath.find_last_of('.');
if (pos >= 0 && pos < iconPath.length()) {
if (pos < iconPath.length()) {
const auto fext = iconPath.substr(pos + 1, iconPath.length()).lowercase();
// Case where iconPath is a PNG file
@@ -220,7 +220,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromSVG(const Glib::us
return surf;
}
rsvg_handle_free(handle);
g_object_unref(handle);
// Set device scale to avoid blur effect
cairo_surface_set_device_scale(surf->cobj(),