Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

Commit

Permalink
Added assert for edge-case
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed May 31, 2018
1 parent 0bfc92b commit 50b67ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cppmat/var_regular_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ template<class X>
inline
vector<X> vector<X>::diff() const
{
assert( this->mSize > 0 );

vector<X> out(this->mSize-1);

for ( size_t i = 0 ; i < this->mSize-1 ; ++i )
Expand Down

0 comments on commit 50b67ed

Please sign in to comment.