Skip to content

Commit

Permalink
run clang-tidy modernize-make-shared
Browse files Browse the repository at this point in the history
  • Loading branch information
scamille committed Nov 22, 2019
1 parent 461105a commit 0e47553
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions engine/util/xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// Send questions to [email protected]
// ==========================================================================

#include <memory>

#include "simulationcraft.hpp"
#include "rapidxml/rapidxml_print.hpp"

Expand Down Expand Up @@ -346,7 +348,7 @@ std::shared_ptr<xml_node_t> xml_node_t::get( sim_t* sim,
std::shared_ptr<xml_node_t> xml_node_t::create( sim_t* sim,
const std::string& input )
{
std::shared_ptr<xml_node_t> root = std::shared_ptr<xml_node_t>( new xml_node_t( "root" ) );
std::shared_ptr<xml_node_t> root = std::make_shared<xml_node_t>( "root" );

std::string buffer = input;
std::string::size_type index = 0;
Expand Down Expand Up @@ -1193,7 +1195,7 @@ sc_xml_t sc_xml_t::create( sim_t* sim,
}

new_xml_cache_entry_t& c = new_xml_cache[ cache_key ];
c.root = std::shared_ptr<sc_xml_t>( new sc_xml_t( document, tmp_buf ) );
c.root = std::make_shared<sc_xml_t>( document, tmp_buf );
c.era = cache::era();

return *c.root;
Expand Down

0 comments on commit 0e47553

Please sign in to comment.