From 2a9b2fb32a3d21c0212b2fb22fc5d6d3053b1416 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 22 Jun 2019 11:20:16 +0200 Subject: [PATCH] Remove wrong description for GenericVector::set_compare_callback and simplify code Signed-off-by: Stefan Weil --- src/ccutil/genericvector.h | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/ccutil/genericvector.h b/src/ccutil/genericvector.h index 8c6bb3b7e9..549b859375 100644 --- a/src/ccutil/genericvector.h +++ b/src/ccutil/genericvector.h @@ -140,11 +140,15 @@ class GenericVector { // Add a callback to be called to delete the elements when the array took // their ownership. - void set_clear_callback(TessCallback1* cb); + void set_clear_callback(TessCallback1* cb) { + clear_cb_ = cb; + } // Add a callback to be called to compare the elements when needed (contains, // get_id, ...) - void set_compare_callback(TessResultCallback2* cb); + void set_compare_callback(TessResultCallback2* cb) { + compare_cb_ = cb; + } // Clear the array, calling the clear callback function if any. // All the owned callbacks are also deleted. @@ -901,21 +905,6 @@ GenericVector& GenericVector::operator=(const GenericVector& other) { return *this; } -// Add a callback to be called to delete the elements when the array took -// their ownership. -template -void GenericVector::set_clear_callback(TessCallback1* cb) { - clear_cb_ = cb; -} - -// Add a callback to be called to delete the elements when the array took -// their ownership. -template -void GenericVector::set_compare_callback( - TessResultCallback2* cb) { - compare_cb_ = cb; -} - // Clear the array, calling the callback function if any. template void GenericVector::clear() {