Skip to content

Commit

Permalink
Trying to fix a leak
Browse files Browse the repository at this point in the history
  • Loading branch information
whaeck committed Oct 15, 2024
1 parent c8a4757 commit b5b7b0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ processBoundaries( std::vector< X >&& x, std::vector< Y >&& y,
}
}
auto next = std::next( xIter );
if ( next != x.end() ) {
if ( next < x.end() ) {

if ( *next == *xIter ) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,14 @@ processBoundaries( std::vector< X >&& x, std::vector< F >&& f,
throw std::exception();
}
auto next = std::next( xIter );
if ( next != x.end() ) {
if ( next < x.end() ) {

Log::error( "An x value can only be repeated a maximum of two times" );
Log::info( "x = {} is present at least three times", *xIter );
throw std::exception();
if ( *next == *xIter ) {

Log::error( "An x value can only be repeated a maximum of two times" );
Log::info( "x = {} is present at least three times", *xIter );
throw std::exception();
}
}
xIter = std::adjacent_find( xIter, x.end() );
}
Expand Down

0 comments on commit b5b7b0b

Please sign in to comment.