Fix clang-tidy: readability-non-const-parameter (4)
authorColin Clark <colin.clark@cclark.uk>
Mon, 5 Feb 2024 10:12:33 +0000 (10:12 +0000)
committerColin Clark <colin.clark@cclark.uk>
Mon, 5 Feb 2024 10:12:33 +0000 (10:12 +0000)
src/exif.h
src/exiv2.cc

index 56e4e1b..f32e733 100644 (file)
@@ -167,7 +167,7 @@ void exif_set_image_comment(FileData* fd, const gchar* comment);
 
 /*raw support */
 guchar *exif_get_preview(ExifData *exif, guint *data_len, gint requested_width, gint requested_height);
-void exif_free_preview(guchar *buf);
+void exif_free_preview(const guchar *buf);
 
 gchar *metadata_file_info(FileData *fd, const gchar *key, MetadataFormat format);
 gchar *metadata_lua_info(FileData *fd, const gchar *key, MetadataFormat format);
index e16d89b..580aba6 100644 (file)
@@ -1235,9 +1235,9 @@ guchar *exif_get_preview(ExifData *exif, guint *data_len, gint requested_width,
        }
 }
 
-void exif_free_preview(guchar *buf)
+void exif_free_preview(const guchar *buf)
 {
-       delete[] static_cast<Exiv2::byte*>(buf);
+delete[] static_cast<const Exiv2::byte*>(buf);
 }
 #endif