diff options
author | Murray Cumming <murrayc@murrayc.com> | 2016-02-05 23:28:12 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-02-05 23:39:39 +0100 |
commit | 1c212efc8e0983a69b29a5cbef7565b13e4ebfa3 (patch) | |
tree | 0fa97d18f9a0255c8c6aa07aee4b3173c8d9ab3a /examples | |
parent | 757fab512e4f390fa6e8645202efd87eebb42b66 (diff) | |
download | glibmm-1c212efc8e0983a69b29a5cbef7565b13e4ebfa3.tar.gz |
C++11: Use emplace_back() instead of push_back().
Diffstat (limited to 'examples')
-rw-r--r-- | examples/network/resolver.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/network/resolver.cc b/examples/network/resolver.cc index 57504795..a4f60bd0 100644 --- a/examples/network/resolver.cc +++ b/examples/network/resolver.cc @@ -137,9 +137,9 @@ split_service_parts (const Glib::ustring& arg) delim2 = arg.find ('/', delim1 + 1); if (delim2 == std::string::npos) return parts; - parts.push_back (arg.substr (0, delim1)); - parts.push_back (arg.substr (delim1 + 1, delim2 - delim1 - 1)); - parts.push_back (arg.substr (delim2 + 1)); + parts.emplace_back (arg.substr (0, delim1)); + parts.emplace_back (arg.substr (delim1 + 1, delim2 - delim1 - 1)); + parts.emplace_back (arg.substr (delim2 + 1)); return parts; } @@ -210,7 +210,7 @@ start_threaded_lookups (char **argv, int argc) { const Glib::ustring arg = argv[i]; const auto thread = new std::thread(&lookup_thread, arg); - result.push_back(thread); + result.emplace_back(thread); } return result; |