use make_shared instead of new

This commit is contained in:
woodser
2019-07-26 18:43:26 -04:00
parent 0cdfc1257a
commit bbff09f321
4 changed files with 48 additions and 48 deletions
+2 -2
View File
@@ -229,12 +229,12 @@ namespace monero {
// merge blocks if they're different which comes back to merging txs
if (block != other->block) {
if (block == boost::none) {
block = shared_ptr<MoneroBlock>(new MoneroBlock());
block = make_shared<MoneroBlock>();
block.get()->txs.push_back(self);
block.get()->height = other->getHeight();
}
if (other->block == boost::none) {
other->block = shared_ptr<MoneroBlock>(new MoneroBlock());
other->block = make_shared<MoneroBlock>();
other->block.get()->txs.push_back(other);
other->block.get()->height = self->getHeight();
}