remove const_cast
authorRosen Penev <rosenp@gmail.com>
Sun, 4 Jun 2023 18:59:59 +0000 (11:59 -0700)
committerColin Clark <colin.clark@cclark.uk>
Thu, 8 Jun 2023 12:18:25 +0000 (13:18 +0100)
No need for it. Nothing is modified.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
src/similar.cc

index 0cbf960..24f4703 100644 (file)
@@ -25,7 +25,7 @@
 
 /**
  * @file
- * 
+ *
  * These functions are intended to find images with similar color content. For
  * example when an image was saved at different compression levels or dimensions
  * (scaled down/up) the contents are similar, but these files do not match by file
@@ -49,7 +49,6 @@
  * find images that have been re-saved to other formats, dimensions, or compression.
  */
 
-
 /*
  * The experimental (alternate) algorithm is only for testing of new techniques to
  * improve the result, and hopes to reduce false positives.
@@ -81,8 +80,8 @@ void image_sim_free(ImageSimilarityData *sd)
 
 static gint image_sim_channel_eq_sort_cb(gconstpointer a, gconstpointer b)
 {
-       auto pa = static_cast<gint *>(const_cast<gpointer>(a));
-       auto pb = static_cast<gint *>(const_cast<gpointer>(b));
+       auto pa = static_cast<const gint *>(a);
+       auto pb = static_cast<const gint *>(b);
        if (pa[1] < pb[1]) return -1;
        if (pa[1] > pb[1]) return 1;
        return 0;