Commit f3986547 for tesseract

commit f3986547a6df074f0543059a2768e407e16ee600
Author: Stefan Weil <sw@weilnetz.de>
Date:   Sat Jun 20 14:42:34 2026 +0200

    Fix compiler warnings in kdpair.h (-Wold-style-cast)

    Signed-off-by: Stefan Weil <sw@weilnetz.de>

diff --git a/src/ccutil/kdpair.h b/src/ccutil/kdpair.h
index 96fad325..4d60e454 100644
--- a/src/ccutil/kdpair.h
+++ b/src/ccutil/kdpair.h
@@ -104,7 +104,7 @@ public:
   // Copy constructor steals the pointer from src and nulls it in src, thereby
   // moving the (single) ownership of the data.
   KDPtrPair(const KDPtrPair &src) : data_(src.data_), key_(src.key_) {
-    ((KDPtrPair &)src).data_ = nullptr;
+    const_cast<KDPtrPair &>(src).data_ = nullptr;
   }
   // Destructor deletes data, assuming it is the sole owner.
   ~KDPtrPair() {
@@ -116,7 +116,7 @@ public:
   void operator=(const KDPtrPair &src) {
     delete this->data_;
     this->data_ = src.data_;
-    ((KDPtrPair &)src).data_ = nullptr;
+    const_cast<KDPtrPair &>(src).data_ = nullptr;
     this->key_ = src.key_;
   }