From 839f528b9a87a3f051e34944a3bfc15bc6866a73 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 28 Nov 2021 09:54:59 +0100 Subject: [PATCH] Remove unused GenericVector::contains_index, UnicityTable::contains_id Signed-off-by: Stefan Weil --- src/ccutil/genericvector.h | 9 --------- src/ccutil/unicity_table.h | 5 ----- 2 files changed, 14 deletions(-) diff --git a/src/ccutil/genericvector.h b/src/ccutil/genericvector.h index 0548b8a328..105b79a521 100644 --- a/src/ccutil/genericvector.h +++ b/src/ccutil/genericvector.h @@ -103,9 +103,6 @@ class GenericVector { // Return the index of the T object. int get_index(const T &object) const; - // Return true if the index is valid - T contains_index(int index) const; - // Push an element in the end of the array int push_back(T object); void operator+=(const T &t); @@ -612,12 +609,6 @@ void GenericVector::remove(int index) { size_used_--; } -// Return true if the index is valindex -template -T GenericVector::contains_index(int index) const { - return index >= 0 && index < size_used_; -} - // Return the index of the T object. template int GenericVector::get_index(const T &object) const { diff --git a/src/ccutil/unicity_table.h b/src/ccutil/unicity_table.h index 9c33a5f2f0..8e2ccde855 100644 --- a/src/ccutil/unicity_table.h +++ b/src/ccutil/unicity_table.h @@ -69,11 +69,6 @@ class UnicityTable { return table_.get_index(object); } - /// Return true if the id is valid - T contains_id(int id) const { - return table_.contains_index(id); - } - /// Add an element in the table int push_back(T object) { auto idx = get_index(object);