[libsigcplusplus] self_and_iter: Take the iterator by const ref and store it as const.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] self_and_iter: Take the iterator by const ref and store it as const.
- Date: Fri, 15 Apr 2016 14:58:29 +0000 (UTC)
commit 48611e840e9a00937026f3d478889380b0efc158
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Apr 15 16:53:15 2016 +0200
self_and_iter: Take the iterator by const ref and store it as const.
This is less generically useful, but this isn't a generally used class.
sigc++/signal_base.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sigc++/signal_base.cc b/sigc++/signal_base.cc
index 8d7c357..4916002 100644
--- a/sigc++/signal_base.cc
+++ b/sigc++/signal_base.cc
@@ -29,9 +29,9 @@ namespace internal
struct self_and_iter : public notifiable
{
signal_impl* self_;
- signal_impl::iterator_type iter_;
+ const signal_impl::iterator_type iter_;
- self_and_iter(signal_impl* self, signal_impl::iterator_type iter) : self_(self), iter_(iter) {}
+ self_and_iter(signal_impl* self, const signal_impl::iterator_type& iter) : self_(self), iter_(iter) {}
};
signal_impl::signal_impl() : ref_count_(0), exec_count_(0), deferred_(false)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]