3rd Repo, trying to figure this out.
Fork of SOFT253_Template_Weather_OS_54 by
Diff: CircularArray/CircularArray.cpp
- Revision:
- 71:a935e4b88ad8
- Parent:
- 65:3723d2729b68
- Child:
- 72:ef4a4e3089c1
--- a/CircularArray/CircularArray.cpp Fri Apr 21 17:37:48 2017 +0000 +++ b/CircularArray/CircularArray.cpp Fri Apr 21 18:32:12 2017 +0000 @@ -18,8 +18,7 @@ firstValue++; currentSize--; } - int nextSpace = firstValue + currentSize; - nextSpace = nextSpace % maxSize; + int nextSpace = nextSpace(); array[nextSpace] = _measure; currentSize++; }