source:
dev/trunk/ab5.0/jenga/include/common/VectorSupporter.h@
705
| Last change on this file since 705 was 624, checked in by , 17 years ago | |
|---|---|
| File size: 242 bytes | |
| Line | |
|---|---|
| 1 | #pragma once |
| 2 | |
| 3 | namespace Jenga{ |
| 4 | namespace Common{ |
| 5 | |
| 6 | |
| 7 | template<class T> void EraseVectorItem( T &v, int index ) |
| 8 | { |
| 9 | T::iterator it = v.begin(); |
| 10 | int i = 0; |
| 11 | while( i < index ) |
| 12 | { |
| 13 | i ++; |
| 14 | it ++; |
| 15 | } |
| 16 | v.erase( it ); |
| 17 | } |
| 18 | |
| 19 | |
| 20 | |
| 21 | } |
| 22 | } |
Note:
See TracBrowser
for help on using the repository browser.
