Merge "allow a isMaster client in LocAdapterProxyBase ctor"

This commit is contained in:
qctecmdr Service 2019-03-12 18:52:28 -07:00 committed by Gerrit - the friendly Code Review server
commit 1b6ad38fb9
2 changed files with 5 additions and 9 deletions

View file

@ -69,15 +69,11 @@ protected:
inline LocAdapterBase(const MsgTask* msgTask) :
mIsMaster(false), mEvtMask(0), mContext(NULL), mLocApi(NULL),
mLocAdapterProxyBase(NULL), mMsgTask(msgTask) {}
LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
ContextBase* context, bool isMaster,
LocAdapterProxyBase *adapterProxyBase = NULL);
public:
inline virtual ~LocAdapterBase() { mLocApi->removeAdapter(this); }
inline LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
ContextBase* context,
LocAdapterProxyBase *adapterProxyBase = NULL) :
LocAdapterBase(mask, context, false, adapterProxyBase) {}
LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
ContextBase* context, bool isMaster = false,
LocAdapterProxyBase *adapterProxyBase = NULL);
inline LOC_API_ADAPTER_EVENT_MASK_T
checkMask(LOC_API_ADAPTER_EVENT_MASK_T mask) const {

View file

@ -40,8 +40,8 @@ private:
LocAdapterBase *mLocAdapterBase;
protected:
inline LocAdapterProxyBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
ContextBase* context):
mLocAdapterBase(new LocAdapterBase(mask, context, this)) {
ContextBase* context, bool isMaster = false):
mLocAdapterBase(new LocAdapterBase(mask, context, isMaster, this)) {
}
inline virtual ~LocAdapterProxyBase() {
delete mLocAdapterBase;