Changeset 793 for cpp/frams/util/list.h
- Timestamp:
- 05/29/18 16:51:14 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/list.h
r781 r793 18 18 public: 19 19 int objects, allocations, copied, totalmem, usedmem; 20 SListStats() :objects(0),allocations(0),copied(0),totalmem(0),usedmem() {}20 SListStats() :objects(0), allocations(0), copied(0), totalmem(0), usedmem() {} 21 21 ~SListStats() 22 22 { … … 29 29 " usage = %ld %%\n" 30 30 "------------------------\n", 31 objects, allocations,copied,totalmem,(usedmem*100)/totalmem);31 objects, allocations, copied, totalmem, (usedmem * 100) / totalmem); 32 32 } 33 33 }; … … 47 47 #ifdef SLISTSTATS 48 48 SListStats::stats.allocations++; 49 SListStats::stats.copied +=sizeof(T)*min(x,have);49 SListStats::stats.copied += sizeof(T)*min(x, have); 50 50 #endif 51 51 } … … 65 65 #ifdef SLISTSTATS 66 66 SListStats::stats.objects++; 67 SListStats::stats.totalmem +=sizeof(T)*have;68 SListStats::stats.usedmem +=sizeof(T)*used;67 SListStats::stats.totalmem += sizeof(T)*have; 68 SListStats::stats.usedmem += sizeof(T)*used; 69 69 #endif 70 70 hardclear(); … … 100 100 { 101 101 if (size() != l.size()) return 0; 102 for (int i = 0; i <size(); i++) if (l.mem[i] != mem[i]) return 0;102 for (int i = 0; i < size(); i++) if (l.mem[i] != mem[i]) return 0; 103 103 return 1; 104 104 }
Note: See TracChangeset
for help on using the changeset viewer.