Skip to content

Commit

Permalink
lvarray: fix cppcheck warnings
Browse files Browse the repository at this point in the history
```
warning: Rethrowing current exception with 'throw;', it seems there is no current
exception to rethrow. If there is no current exception this calls std::terminate().
```
  • Loading branch information
benoit-pierre committed Jul 21, 2024
1 parent 9ce05be commit 43cb034
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions crengine/include/lvarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,7 @@ class LVArray
/// copies range to beginning of array
void trim( int pos, int count, int reserved )
{
#if defined(_DEBUG) && !defined(ANDROID)
if ( pos<0 || count<=0 || pos+count > _count )
throw;
#endif
assert(pos >= 0 && count > 0 && pos+count <= _count);
int i;
int new_sz = count;
if (new_sz < reserved)
Expand All @@ -154,10 +151,7 @@ class LVArray
/// removes several items from vector
void erase( int pos, int count )
{
#if defined(_DEBUG) && !defined(ANDROID)
if ( pos<0 || count<=0 || pos+count > _count )
throw;
#endif
assert(pos >= 0 && count > 0 && pos+count <= _count);
int i;
for (i=pos+count; i<_count; i++)
{
Expand Down

0 comments on commit 43cb034

Please sign in to comment.