From 0cf743be2d6b351b1c09d240aa7a20443c8026ed Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 11 Dec 2018 10:25:47 -0800 Subject: Fixed some indenting that gcc whined about. --- src/stable/array.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/stable/array.h') diff --git a/src/stable/array.h b/src/stable/array.h index 8c17cc4..82b43a4 100644 --- a/src/stable/array.h +++ b/src/stable/array.h @@ -377,11 +377,15 @@ namespace Bu iterator operator++( int ) { if( iPos < 0 ) + { throw ArrayException( "Cannot increment iterator past end of array."); - iPos++; + } + iPos++; if( iPos >= src.getSize() ) + { iPos = -1; + } return *this; } @@ -397,9 +401,11 @@ namespace Bu iterator operator+( int iAmnt ) { if( iPos < 0 ) + { throw ArrayException( "Cannot increment iterator past end of array."); - iPos += iAmnt; + } + iPos += iAmnt; if( iPos >= src.getSize() ) iPos = -1; return *this; @@ -408,9 +414,11 @@ namespace Bu iterator operator--( int ) { if( iPos < 0 ) + { throw ArrayException( "Cannot increment iterator past end of array."); - iPos--; + } + iPos--; if( iPos < 0 ) iPos = -1; return *this; @@ -507,9 +515,11 @@ namespace Bu const_iterator operator++( int ) { if( iPos < 0 ) + { throw ArrayException( "Cannot increment iterator past end of array."); - iPos++; + } + iPos++; if( iPos >= src.getSize() ) iPos = -1; return *this; @@ -527,9 +537,11 @@ namespace Bu const_iterator operator--( int ) { if( iPos < 0 ) + { throw ArrayException( "Cannot increment iterator past end of array."); - iPos--; + } + iPos--; if( iPos < 0 ) iPos = -1; return *this; -- cgit v1.2.3