[libsigcplusplus] trackable: Use emplace_back() instead of push_back().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] trackable: Use emplace_back() instead of push_back().
- Date: Fri, 21 Jul 2017 06:24:37 +0000 (UTC)
commit 562d2095e03664b63b4bfbbddda472d3d7373568
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Jul 21 08:18:50 2017 +0200
trackable: Use emplace_back() instead of push_back().
Found by clang-tidy.
sigc++/trackable.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/sigc++/trackable.cc b/sigc++/trackable.cc
index 8ee8ee4..fdff747 100644
--- a/sigc++/trackable.cc
+++ b/sigc++/trackable.cc
@@ -119,7 +119,7 @@ trackable_callback_list::add_callback(notifiable* data, func_destroy_notify func
// I'd consider this a serious application bug, since the app is likely to segfault.
// But then, how should we handle it? Throw an exception? Martin.
if (!clearing_)
- callbacks_.push_back(trackable_callback(data, func));
+ callbacks_.emplace_back(trackable_callback(data, func));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]