未验证 提交 4fa08ecd 编写于 作者: O openharmony_ci 提交者: Gitee

!1698 FIX:修改计算偏移量的实现方法

Merge pull request !1698 from cheng_jinsong/0116
......@@ -146,8 +146,7 @@ public:
static WatcherNodePtr GetNextFromList(ListHeadPtr list, uint32_t nodeId);
static WatcherNodePtr ConvertNodeToBase(ListNodePtr node)
{
WatcherNodePtr tmp = nullptr;
return reinterpret_cast<WatcherNodePtr >((char *)node - (char *)tmp->GetListNode());
return reinterpret_cast<WatcherNodePtr >((char *)node - (char*)(&(((WatcherNodePtr)0)->node_)));
}
ListNodePtr GetListNode()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册