diff options
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/contrib/weakptr.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apt-pkg/contrib/weakptr.h b/apt-pkg/contrib/weakptr.h index 6cfa948ac..11e860381 100644 --- a/apt-pkg/contrib/weakptr.h +++ b/apt-pkg/contrib/weakptr.h @@ -55,9 +55,8 @@ public: * Deconstruct the object, set all weak pointers to NULL. */ ~WeakPointable() { - std::set<WeakPointable**>::iterator iter = pointers.begin(); - while (iter != pointers.end()) - **(iter++) = NULL; + for (auto pointer : pointers) + *pointer = nullptr; } }; |
