author | Michael Krelin <hacker@klever.net> | 2008-09-22 20:08:35 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-09-22 20:08:35 (UTC) |
commit | 4522de61114018633f66492e2e9977cdb3108098 (patch) (side-by-side diff) | |
tree | 2af460f9269163320098476d484dee867c4e8138 /include/opkele | |
parent | 767b9926a3b2a2ab000415cc5d36df84dd90f13f (diff) | |
download | libopkele-4522de61114018633f66492e2e9977cdb3108098.zip libopkele-4522de61114018633f66492e2e9977cdb3108098.tar.gz libopkele-4522de61114018633f66492e2e9977cdb3108098.tar.bz2 |
A couple of bugfixes
- added missing 'return' statement to the forward_iterator_proxy operator=()
- made temporary non-static for thread safety in url_decode()
Thanks to Masato Kataoka of orenosv project
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/iterator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/opkele/iterator.h b/include/opkele/iterator.h index 8f86234..94da7e4 100644 --- a/include/opkele/iterator.h +++ b/include/opkele/iterator.h @@ -98,17 +98,17 @@ namespace opkele { template<typename IT> forward_iterator_proxy(const IT& i) : I(new forward_iterator_proxy_impl<IT>(i)) { } forward_iterator_proxy(const forward_iterator_proxy<T,TR,TP>& x) : I(x.I->dup()) { } ~forward_iterator_proxy() { delete I; } forward_iterator_proxy& operator=(const forward_iterator_proxy<T,TR,TP>& x) { - delete I; I = x.I->dup(); } + delete I; I = x.I->dup(); return *this; } bool operator==(const forward_iterator_proxy<T,TR,TP>& x) const { return (*I)==(*(x.I)); } bool operator!=(const forward_iterator_proxy<T,TR,TP>& x) const { return (*I)!=(*(x.I)); } TR operator*() const { return **I; } |