瀏覽代碼

移除优先级最高,放在最前面

chensongchao 5 年之前
父節點
當前提交
97fdf20069
共有 1 個文件被更改,包括 5 次插入7 次删除
  1. 5 7
      his_location.cpp

+ 5 - 7
his_location.cpp

@@ -146,8 +146,11 @@ bool location_card::is_map_changed(int new_mapid)
 }
 void location_card::push(uint64_t timestamp,const point & p,int32_t areaid,int32_t mapid,bool bclose/* = false*/)
 {
-    log_info("his_location:card[%d] area[%d] Point(%.2f,%.2f)--->(%.2f,%.2f)",m_cardid,areaid,m_p.x,m_p.y,p.x,p.y);
-
+    if (bclose) //卡移除后直接更新his_location
+    {
+        update(p,timestamp,true);
+        return;
+    }
     if(m_p.empty() || m_timestamp==0||m_areaid<0||m_mapid<0)
     {
         set(p,timestamp);
@@ -179,11 +182,6 @@ void location_card::push(uint64_t timestamp,const point & p,int32_t areaid,int32
         insert();
         return;
     }
-    if (bclose) //卡移除后直接更新his_location
-    {
-        update(p,timestamp,true);
-        return;
-    }
 
     bool flag=false;
     int  iflag=0;