summaryrefslogtreecommitdiff
path: root/src/piraha/smart_ptr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/piraha/smart_ptr.hpp')
-rw-r--r--src/piraha/smart_ptr.hpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/piraha/smart_ptr.hpp b/src/piraha/smart_ptr.hpp
index 0994a821..0ac761b3 100644
--- a/src/piraha/smart_ptr.hpp
+++ b/src/piraha/smart_ptr.hpp
@@ -20,8 +20,7 @@ extern std::vector<void*> ptrs;
inline void add(std::vector<void*>& v,void *t) {
if(t == NULL)
return;
- typedef typename std::vector<void*>::iterator iter;
- for(iter i=v.begin();i != v.end();++i) {
+ for(std::vector<void*>::iterator i=v.begin();i != v.end();++i) {
assert(*i != t);
}
v.push_back(t);
@@ -30,8 +29,7 @@ inline void add(std::vector<void*>& v,void *t) {
inline void remove(std::vector<void*>& v,void* t) {
if(t == NULL)
return;
- typedef typename std::vector<void*>::iterator iter;
- for(iter i=v.begin();i != v.end();++i) {
+ for(std::vector<void*>::iterator i=v.begin();i != v.end();++i) {
if(*i == t) {
v.erase(i);
return;