From 4e1368522d5ff87ebdcc952a76fb4c11d9af6fb3 Mon Sep 17 00:00:00 2001 From: boyce <6549168@qq.com> Date: Wed, 21 Aug 2019 15:52:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/Module.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/service/Module.go b/service/Module.go index 3207130..cc211d3 100644 --- a/service/Module.go +++ b/service/Module.go @@ -112,9 +112,6 @@ func (slf *BaseModule) genModuleId() uint32 { slf.CurrMaxModuleId = slf.CurrMaxModuleId + 1 moduleId := slf.CurrMaxModuleId - if moduleId == 0 { - GetLogger().Printf(LEVER_ERROR, "%T Cannot AddModule is zero", slf.GetSelf()) - } return moduleId } @@ -216,7 +213,7 @@ func (slf *BaseModule) AddModule(module IModule) uint32 { //如果没有设置,自动生成ModuleId var genid uint32 if module.GetModuleId() == 0 { - genid = slf.genModuleId() + genid = slf.genModuleId() module.SetModuleId(genid) } @@ -239,7 +236,7 @@ func (slf *BaseModule) AddModule(module IModule) uint32 { } _, ok := slf.mapModule[module.GetModuleId()] if ok == true { - GetLogger().Printf(LEVER_ERROR, "check mapModule %#v id is %d ,%d is fail...", module, module.GetModuleId(),genid) + GetLogger().Printf(LEVER_ERROR, "check mapModule %#v id is %d ,%d is fail...", module, module.GetModuleId(), genid) return 0 }