提交 88934535 编写于 作者: X xionglei6

fix: inner source issue

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 2d8c6017
......@@ -60,14 +60,13 @@ uint32_t WatcherManager::AddWatcher(const std::string &keyPrefix, const sptr<IWa
uint32_t groupId = 0;
ret = GetGroupId(groupId);
WATCHER_CHECK(ret == 0, return 0, "Failed to get group id for %s", keyPrefix.c_str());
TUNE_MAKE_SHARED(group = std::make_shared<WatcherGroup>(groupId, keyPrefix),
WATCHER_LOGE("Failed to create group for %s", keyPrefix.c_str()); return 0);
group = std::make_shared<WatcherGroup>(groupId, keyPrefix);
WATCHER_CHECK(group != nullptr, return 0, "Failed to create group for %s", keyPrefix.c_str());
} else {
newGroup = group->Emptry();
}
ParamWatcherPtr paramWather = nullptr;
TUNE_MAKE_SHARED(paramWather = std::make_shared<ParamWatcher>(watcherId, watcher, group),
WATCHER_LOGE("Failed to create watcher for %s", keyPrefix.c_str()); return 0);
ParamWatcherPtr paramWather = std::make_shared<ParamWatcher>(watcherId, watcher, group);
WATCHER_CHECK(paramWather != nullptr, return 0, "Failed to create watcher for %s", keyPrefix.c_str());
AddParamWatcher(keyPrefix, group, paramWather);
if (newGroup) {
StartLoop();
......
......@@ -29,14 +29,6 @@
#include "parcel.h"
#include "system_ability.h"
#include "watcher_manager_stub.h"
#define TUNE_MAKE_SHARED(exec_expr0, exec_expr1) \
do { \
try { \
exec_expr0; \
} catch(...) { \
exec_expr1; \
}; \
} while (0)
namespace OHOS {
namespace init_param {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册