From 2a5fcdcfb13352d15d9a59ab1b0d2ee78562fa5a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 13 Apr 2022 12:59:21 +0100 Subject: [PATCH] Add reserve() in generic code and change comment to avoid warning --- Nef_3/include/CGAL/Nef_3/ID_support_handler.h | 22 ++++++++++--------- .../include/CGAL/Nef_S2/ID_support_handler.h | 2 ++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/ID_support_handler.h b/Nef_3/include/CGAL/Nef_3/ID_support_handler.h index a6dd108b221..13235bc9415 100644 --- a/Nef_3/include/CGAL/Nef_3/ID_support_handler.h +++ b/Nef_3/include/CGAL/Nef_3/ID_support_handler.h @@ -65,16 +65,18 @@ class ID_support_handler { hash.reserve(n); } - // The method get_hash implements a - // two-pass union find algorithm - // __ __ _______ - // / \ / \ / _____\ - // _|__|__|__|_ _/__/__/__|_ - // | | v | v | | | | | v | - // | O O O O | => | O O O O | - // |____|__^____| |____________| - // | | root - // \_/ + /* + The method get_hash implements a + two-pass union find algorithm + __ __ _______ + / \ / \ / _____\ + _|__|__|__|_ _/__/__/__|_ + | | v | v | | | | | v | + | O O O O | => | O O O O | + |____|__^____| |____________| + | | root + \_/ + */ int get_hash(int i) { int root(i); while(hash[root] != root) diff --git a/Nef_S2/include/CGAL/Nef_S2/ID_support_handler.h b/Nef_S2/include/CGAL/Nef_S2/ID_support_handler.h index 9a9b3bcfcd1..c8523a2ee7d 100644 --- a/Nef_S2/include/CGAL/Nef_S2/ID_support_handler.h +++ b/Nef_S2/include/CGAL/Nef_S2/ID_support_handler.h @@ -38,6 +38,8 @@ class ID_support_handler { public: ID_support_handler() {} + void reserve(std::size_t n) {} + int get_hash(int) { return 0; } template void initialize_hash(Handle /*h*/) {} void initialize_hash(int /*i*/) {}