Commit b44612df authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

I should learn to test before I commit

parent 33b8572e
......@@ -49,14 +49,7 @@ public:
* @param e Engine that created the endpoint.
* @param addr Mercury address.
*/
endpoint(engine& e, hg_addr_t addr, bool take_ownership=true)
: m_engine(&e), m_addr(HG_ADDR_NULL) {
if(take_ownership) {
m_addr = addr;
} else {
margo_addr_dup(m_engine->m_mid, addr, &m_addr);
}
}
endpoint(engine& e, hg_addr_t addr, bool take_ownership=true);
/**
* @brief Default constructor defined so that endpoints can
......
......@@ -9,6 +9,15 @@
namespace thallium {
endpoint::endpoint(engine& e, hg_addr_t addr, bool take_ownership)
: m_engine(&e), m_addr(HG_ADDR_NULL) {
if(take_ownership) {
m_addr = addr;
} else {
margo_addr_dup(m_engine->m_mid, addr, &m_addr);
}
}
endpoint::endpoint(const endpoint& other)
: m_engine(other.m_engine) {
if(other.m_addr != HG_ADDR_NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment