d08 ajouts de tests et reparation ex02

This commit is contained in:
Hugo LAMY
2022-03-19 21:39:58 +01:00
parent b3df6acd20
commit 58a7fccc49
7 changed files with 113 additions and 23 deletions

View File

@@ -68,7 +68,7 @@ bool Span::empty() const {
* PUBLIC MEMBER FUNCTIONS
*********************************************/
void Span::addNumber(int nb) {
void Span::addNumber(int nb) {
if (_container.size() >= _max)
throw std::out_of_range(B_RED "out of range number" RESET);
_container.push_back(nb);
@@ -98,8 +98,6 @@ void Span::addNumber(InputIterator first, InputIterator last) {
}
template void Span::addNumber<int*>(int*, int*);
unsigned int Span::shortestSpan() {
int const size = _container.size();
unsigned int shortest = longestSpan();
@@ -123,9 +121,3 @@ unsigned int Span::longestSpan() {
return (_sort.back() - _sort.front());
}
/*********************************************
* NESTED CLASS
*********************************************/
//void Span::Class::function() {}