mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
fix code style warnings
Signed-off-by: Gymee <yumeijie@huawei.com> Change-Id: I7f6290aae5d4728fc80e3b582f6bf31826fc6564
This commit is contained in:
parent
c098d05193
commit
8afdb9f029
@ -43,7 +43,6 @@ public:
|
||||
const std::string& GetDeviceId() const;
|
||||
int32_t GetDeviceType() const;
|
||||
int32_t GetDeviceState() const;
|
||||
|
||||
bool Marshalling(Parcel& parcel) const override;
|
||||
|
||||
private:
|
||||
|
@ -44,10 +44,11 @@ int32_t AbilityConnectionWrapperStub::OnRemoteRequest(uint32_t code, MessageParc
|
||||
HILOGE("AbilityConnectionWrapperStub element is null");
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
int32_t resultCode = ERR_NONE;
|
||||
switch (code) {
|
||||
case IAbilityConnection::ON_ABILITY_CONNECT_DONE: {
|
||||
if (auto remoteObject = data.ReadParcelable<IRemoteObject>()) {
|
||||
auto resultCode = data.ReadInt32();
|
||||
resultCode = data.ReadInt32();
|
||||
OnAbilityConnectDone(*element, remoteObject, resultCode);
|
||||
return ERR_NONE;
|
||||
}
|
||||
@ -55,7 +56,7 @@ int32_t AbilityConnectionWrapperStub::OnRemoteRequest(uint32_t code, MessageParc
|
||||
return ERR_INVALID_DATA;
|
||||
}
|
||||
case IAbilityConnection::ON_ABILITY_DISCONNECT_DONE: {
|
||||
auto resultCode = data.ReadInt32();
|
||||
resultCode = data.ReadInt32();
|
||||
OnAbilityDisconnectDone(*element, resultCode);
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
@ -137,7 +137,6 @@ bool DnetworkAdapter::AddDeviceChangeListener(const std::shared_ptr<DeviceListen
|
||||
}
|
||||
HILOGI("AddDeviceChangeListener %{public}s", (errCode == ERR_OK) ? "success" : "timeout");
|
||||
};
|
||||
|
||||
if (!dnetworkHandler_->PostTask(registerTask)) {
|
||||
HILOGE("AddDeviceChangeListener post task failed");
|
||||
return false;
|
||||
|
@ -731,7 +731,7 @@ void DistributedSchedService::ProcessConnectDied(const sptr<IRemoteObject>& conn
|
||||
}
|
||||
DecreaseConnectLocked(callerInfo.uid);
|
||||
if (itConnect->first != nullptr) {
|
||||
itConnect->first ->RemoveDeathRecipient(connectDeathRecipient_);
|
||||
itConnect->first->RemoveDeathRecipient(connectDeathRecipient_);
|
||||
}
|
||||
distributedConnectAbilityMap_.erase(itConnect++);
|
||||
} else {
|
||||
|
@ -57,7 +57,6 @@ bool DtbschedmgrDeviceInfoStorage::Init()
|
||||
std::this_thread::sleep_for(1s);
|
||||
}
|
||||
};
|
||||
|
||||
if (!initHandler_->PostTask(func)) {
|
||||
HILOGE("DtbschedmgrDeviceInfoStorage::Init handler postTask failed");
|
||||
return false;
|
||||
|
@ -18,27 +18,27 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace DistributedSchedule {
|
||||
#define DECLARE_SINGLE_INSTANCE_BASE(className) \
|
||||
public: \
|
||||
static className& GetInstance(); \
|
||||
private: \
|
||||
className(const className&) = delete; \
|
||||
className& operator= (const className&) = delete;\
|
||||
className(className&&) = delete; \
|
||||
className& operator= (className&&) = delete; \
|
||||
#define DECLARE_SINGLE_INSTANCE_BASE(className) \
|
||||
public: \
|
||||
static className& GetInstance(); \
|
||||
private: \
|
||||
className(const className&) = delete; \
|
||||
className& operator= (const className&) = delete; \
|
||||
className(className&&) = delete; \
|
||||
className& operator= (className&&) = delete; \
|
||||
|
||||
|
||||
#define DECLARE_SINGLE_INSTANCE(className) \
|
||||
DECLARE_SINGLE_INSTANCE_BASE(className)\
|
||||
private: \
|
||||
className() = default; \
|
||||
~className() = default; \
|
||||
#define DECLARE_SINGLE_INSTANCE(className) \
|
||||
DECLARE_SINGLE_INSTANCE_BASE(className) \
|
||||
private: \
|
||||
className() = default; \
|
||||
~className() = default; \
|
||||
|
||||
#define IMPLEMENT_SINGLE_INSTANCE(className)\
|
||||
className& className::GetInstance() \
|
||||
{ \
|
||||
static auto instance = new className(); \
|
||||
return *instance; \
|
||||
#define IMPLEMENT_SINGLE_INSTANCE(className) \
|
||||
className& className::GetInstance() \
|
||||
{ \
|
||||
static auto instance = new className(); \
|
||||
return *instance; \
|
||||
}
|
||||
}; // namespace DistributedSchedule
|
||||
}; // namespace OHOS
|
||||
|
Loading…
Reference in New Issue
Block a user