[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 8eead43 4/6: Don't write 'new'
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 8eead43 4/6: Don't write 'new' |
Date: |
Fri, 19 Oct 2018 15:45:07 -0400 (EDT) |
branch: master
commit 8eead43e9090c3ffff064844b182a894627c4a91
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Don't write 'new'
---
group_values.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/group_values.cpp b/group_values.cpp
index d7014f7..733b00f 100644
--- a/group_values.cpp
+++ b/group_values.cpp
@@ -43,6 +43,7 @@
#include <algorithm> // max()
#include <iterator> // back_inserter()
+#include <memory> // make_shared()
#include <string>
namespace
@@ -267,7 +268,7 @@ census_run_result run_census_in_parallel::operator()
{
{ // Begin fenv_guard scope.
fenv_guard fg;
- std::shared_ptr<AccountValue> z(new AccountValue(ip));
+ auto z {std::make_shared<AccountValue>(ip)};
cell_values.push_back(z);
AccountValue& av = *cell_values.back();
- [lmi-commits] [lmi] master updated (4c21bf7 -> 2ba6003), Greg Chicares, 2018/10/19
- [lmi-commits] [lmi] master 8eead43 4/6: Don't write 'new',
Greg Chicares <=
- [lmi-commits] [lmi] master 4d87259 3/6: Create and use a proper alias, Greg Chicares, 2018/10/19
- [lmi-commits] [lmi] master d2b8c01 1/6: Improve physical design: unique_ptr member --> out-of-line ~owner(), Greg Chicares, 2018/10/19
- [lmi-commits] [lmi] master bc32401 5/6: Replace std::shared_ptr with std::unique_ptr, Greg Chicares, 2018/10/19
- [lmi-commits] [lmi] master 86bf250 2/6: Reorder a statement, Greg Chicares, 2018/10/19
- [lmi-commits] [lmi] master 2ba6003 6/6: Dispense with smart pointers, Greg Chicares, 2018/10/19