Skip to content

Commit

Permalink
MSVC constructor pass by value and storage by shared_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenscholl committed Jan 31, 2021
1 parent dd941f6 commit 4127b00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions esl/economics/markets/python_module_markets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ double quote_helper_operator_double(const quote &q)
//}


boost::shared_ptr<quote> construct_quote_from_price(const price &p)
boost::shared_ptr<quote> construct_quote_from_price(price p)
{
return boost::make_shared<quote>(p);
}
Expand All @@ -88,7 +88,7 @@ BOOST_PYTHON_MODULE(_markets)

////////////////////////////////////////////////////////////////////////////

class_<quote>("quote")// init<exchange_rate>())
class_<quote, boost::shared_ptr<quote>>("quote", no_init)// init<exchange_rate>())
.def("__init__", boost::python::make_constructor(construct_quote_from_price))
//.def("__init__", boost::python::make_constructor(construct_quote_from_exchange_rate))
.add_property("price", &quote_helper_get_price, &quote_helper_set_price)
Expand Down
2 changes: 1 addition & 1 deletion esl/version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
constexpr unsigned int ESL_VERSION_MAJOR = 0;
constexpr unsigned int ESL_VERSION_MINOR = 0;
constexpr unsigned int ESL_VERSION_REVISION = 32;
constexpr unsigned int ESL_VERSION_REVISION = 33;

0 comments on commit 4127b00

Please sign in to comment.