Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: linearArray.hpp
- Revision:
- 7:6e24d8ccecd4
- Parent:
- 6:314f180362cb
- Child:
- 8:18c9d62b8f7c
--- a/linearArray.hpp Wed Mar 08 10:57:36 2017 +0000
+++ b/linearArray.hpp Wed Mar 08 10:59:06 2017 +0000
@@ -13,7 +13,7 @@
int LinearArray<type>::push(type item) {
int ret = -1;
- if (elem_count < _array_size) {
+ if (_elem_count < _array_size) {
if (_rear == _array_size - 1) _rear = -1;
_array[++_rear] = item;
ret = _elem_count++;
@@ -27,7 +27,7 @@
type item = NULL;
- if (elem_count > 0) {
+ if (_elem_count > 0) {
item = _array[_front++];
if (_front == _array_size) _front = 0;
_elem_count--;