Commit 10255d01 for tesseract

commit 10255d013a012603d2e865d5da3943538d7be84c
Author: Stefan Weil <sw@weilnetz.de>
Date:   Wed Apr 7 09:25:37 2021 +0200

    Fix new / delete class mismatch

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

diff --git a/src/classify/adaptive.cpp b/src/classify/adaptive.cpp
index 1f4490ba..6586b09f 100644
--- a/src/classify/adaptive.cpp
+++ b/src/classify/adaptive.cpp
@@ -86,9 +86,7 @@ ADAPT_CLASS_STRUCT::~ADAPT_CLASS_STRUCT() {
   FreeBitVector(PermConfigs);
   auto list = TempProtos;
   while (list != nullptr) {
-    if (first_node(list) != nullptr) {
-      delete first_node(list);
-    }
+    delete reinterpret_cast<TEMP_PROTO_STRUCT *>(list->node);
     list = pop(list);
   }
 }
@@ -323,7 +321,7 @@ void WriteAdaptedClass(FILE *File, ADAPT_CLASS_STRUCT *Class, int NumConfigs) {
   fwrite(&NumTempProtos, sizeof(int), 1, File);
   TempProtos = Class->TempProtos;
   iterate(TempProtos) {
-    void *proto = first_node(TempProtos);
+    void *proto = TempProtos->node;
     fwrite(proto, sizeof(TEMP_PROTO_STRUCT), 1, File);
   }