GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: tmp_project/PhoenixGraph/src/list_index_utils_impl.h Lines: 7 7 100.0 %
Date: 2023-10-11 10:52:07 Branches: 5 6 83.3 %

Line Branch Exec Source
1
/***************************************
2
	Auteur : Pierre Aubert
3
	Mail : pierre.aubert@lapp.in2p3.fr
4
	Licence : CeCILL-C
5
****************************************/
6
7
#ifndef __LIST_INDEX_UTILS_IMPL_H__
8
#define __LIST_INDEX_UTILS_IMPL_H__
9
10
#include "list_index_utils.h"
11
12
///Remove index from listIndex
13
/**	@param[out] listIndex : list of index to be modified
14
 * 	@param index : index to be removed from list of index
15
*/
16
template<typename UIdx>
17
2
void listindex_remove(std::list<UIdx> & listIndex, UIdx index){
18
2
	if(listIndex.size() == 0lu){return;}
19
2
	typename std::list<UIdx>::iterator it(listIndex.begin());
20
7
	while(it != listIndex.end()){
21
5
		if(*it == index){
22
2
			it = listIndex.erase(it);
23
		}else{
24
3
			++it;
25
		}
26
	}
27
}
28
29
#endif
30
31