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) : inline LocAdapterBase(const MsgTask* msgTask) :
mIsMaster(false), mEvtMask(0), mContext(NULL), mLocApi(NULL), mIsMaster(false), mEvtMask(0), mContext(NULL), mLocApi(NULL),
mLocAdapterProxyBase(NULL), mMsgTask(msgTask) {} mLocAdapterProxyBase(NULL), mMsgTask(msgTask) {}
LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
ContextBase* context, bool isMaster,
LocAdapterProxyBase *adapterProxyBase = NULL);
public: public:
inline virtual ~LocAdapterBase() { mLocApi->removeAdapter(this); } inline virtual ~LocAdapterBase() { mLocApi->removeAdapter(this); }
inline LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask, LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
ContextBase* context, ContextBase* context, bool isMaster = false,
LocAdapterProxyBase *adapterProxyBase = NULL) : LocAdapterProxyBase *adapterProxyBase = NULL);
LocAdapterBase(mask, context, false, adapterProxyBase) {}
inline LOC_API_ADAPTER_EVENT_MASK_T inline LOC_API_ADAPTER_EVENT_MASK_T
checkMask(LOC_API_ADAPTER_EVENT_MASK_T mask) const { checkMask(LOC_API_ADAPTER_EVENT_MASK_T mask) const {

View file

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