diff options
-rw-r--r-- | src/FlexArrayTmpl.H | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/FlexArrayTmpl.H b/src/FlexArrayTmpl.H index 627dac8..e365d61 100644 --- a/src/FlexArrayTmpl.H +++ b/src/FlexArrayTmpl.H @@ -51,16 +51,16 @@ public: int append(T value); int append(T *values,int nvals); #ifdef FLEXARRAYDEBUG - T &operator[](int index){ - if(index>=size || index<0) { // range check + T &operator[](int idx){ + if(idx>=size || idx<0) { // range check printf("FlexArray:: Bad index. Arraysize=%u Index=%u\n", - size,index); - index=0; + size,idx); + idx=0; } - return (data[index]); + return (data[idx]); } #else - inline T &operator[](int index){ return (data[index]); } + inline T &operator[](int idx){ return (data[idx]); } #endif // purge? which forces array delete inline void purge(){ |