diff options
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/system.h | 3 | ||||
| -rw-r--r-- | src/base/tl/array.hpp | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/base/system.h b/src/base/system.h index cdbfe294..3c9974d8 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -46,8 +46,7 @@ void dbg_break(); /* Function: dbg_msg - - Prints a debug message. + Prints a debug message. Parameters: sys - A string that describes what system the message belongs to diff --git a/src/base/tl/array.hpp b/src/base/tl/array.hpp index 7fa4ab1b..7b8698d4 100644 --- a/src/base/tl/array.hpp +++ b/src/base/tl/array.hpp @@ -165,7 +165,7 @@ public: int add(const T& item) { incsize(); - set_size(size()+1); + num_elements = size()+1; list[num_elements-1] = item; return num_elements-1; } @@ -189,7 +189,7 @@ public: int index = (int)(&r.front()-list); incsize(); - set_size(size()+1); + num_elements = size()+1; for(int i = num_elements-1; i > index; i--) list[i] = list[i-1]; @@ -283,7 +283,7 @@ public: */ int memusage() { - return sizeof(array) + sizeof(T)*size; + return sizeof(*this) + sizeof(T)*list_size; } /* |