代码格式整改

Signed-off-by: yangziyong <nsyangziyong@huawei.com>
Change-Id: I824e0cbcc9b94154967656b2f0a77b62d1b2f942
This commit is contained in:
yangziyong 2024-07-05 11:39:38 +08:00
parent 169ccd12e9
commit 948cd131f8
6 changed files with 16 additions and 13 deletions

View File

@ -58,9 +58,9 @@ bool AceNewPipeJudgement::QueryAceNewPipeEnabledFA(const std::string& packagenam
uint32_t apiTargetVersion, const std::string& apiReleaseType)
{
if (((apiTargetVersion == NEW_PIPE_MIN_VERSION &&
(apiReleaseType == NEW_PIPE_ENABLED_RELEASE_TYPE || apiReleaseType == NEW_PIPE_ENABLED_RELEASE_TYPE_NEW ||
apiReleaseType == NEW_PIPE_ENABLED_RELEASE_TYPE_RELEASE ||
SystemProperties::GetExtSurfaceEnabled())) ||
(apiReleaseType == NEW_PIPE_ENABLED_RELEASE_TYPE || apiReleaseType == NEW_PIPE_ENABLED_RELEASE_TYPE_NEW ||
apiReleaseType == NEW_PIPE_ENABLED_RELEASE_TYPE_RELEASE ||
SystemProperties::GetExtSurfaceEnabled())) ||
apiTargetVersion > NEW_PIPE_MIN_VERSION) &&
apiCompatibleVersion >= NEW_PIPE_MIN_VERSION) {
return true;

View File

@ -1438,7 +1438,6 @@ void JsiPaEngine::OnVisibilityChanged(const std::map<int64_t, int32_t>& formEven
int32_t JsiPaEngine::OnAcquireFormState(const OHOS::AAFwk::Want& want)
{
shared_ptr<JsRuntime> runtime = GetJsRuntime();
const std::vector<shared_ptr<JsValue>>& argv = { WantToJsValue(want) };
auto func = GetPaFunc("onAcquireFormState");

View File

@ -367,7 +367,8 @@ std::string ResourceAdapterImpl::GetPluralString(uint32_t resId, int quantity)
auto pluralChoice = Localization::GetInstance()->PluralRulesFormat(quantity);
auto iter = std::find(pluralResults.begin(), pluralResults.end(), pluralChoice);
std::string originStr;
if (iter != pluralResults.end() && ++iter != pluralResults.end()) {
if (iter != pluralResults.end() && iter + 1 != pluralResults.end()) {
iter++;
originStr = *iter;
}
return originStr;

View File

@ -102,7 +102,8 @@ TimeOfNow GetTimeOfNow(int32_t hoursWest)
minutesWest = Round(TOTAL_MINUTE_OF_HOUR * timeOfNow.hoursWest_);
} else {
// when [hoursWest] is invalid, set current time zone to [hoursWest].
if (!NearEqual(timeOfNow.hoursWest_, INT_MAX)) { // default value of hoursWest_ is INT_MAX
// default value of hoursWest_ is INT_MAX
if (!NearEqual(timeOfNow.hoursWest_, INT_MAX)) {
LOGW("hoursWest [%{public}d] is invalid, use current time zone.", timeOfNow.hoursWest_);
}
timeOfNow.hoursWest_ = timeZone.tz_minuteswest / TOTAL_MINUTE_OF_HOUR;
@ -156,7 +157,8 @@ TimeOfZone GetTimeOfZone(int32_t hoursWest)
minutesWest = Round(TOTAL_MINUTE_OF_HOUR * timeOfZone.hoursWest_);
} else {
// when [hoursWest] is invalid, set current time zone to [hoursWest].
if (!NearEqual(timeOfZone.hoursWest_, DEFAULT_HOURS_WEST)) { // default value of hoursWest_ is DEFAULT_HOURS_WEST
// default value of hoursWest_ is DEFAULT_HOURS_WEST
if (!NearEqual(timeOfZone.hoursWest_, DEFAULT_HOURS_WEST)) {
LOGW("hoursWest [%{public}d] is invalid, use current time zone.", timeOfZone.hoursWest_);
}
timeOfZone.hoursWest_ = minutesWest / TOTAL_MINUTE_OF_HOUR;

View File

@ -330,8 +330,9 @@ NG::PaddingPropertyF JSToggle::GetOldPadding(const JSCallbackInfo& info)
NG::PaddingProperty JSToggle::GetNewPadding(const JSCallbackInfo& info)
{
NG::PaddingProperty padding(
{ NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp) });
NG::PaddingProperty padding({
NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp)
});
if (info[0]->IsObject()) {
std::optional<CalcDimension> left;
std::optional<CalcDimension> right;
@ -373,8 +374,9 @@ NG::PaddingProperty JSToggle::GetPadding(const std::optional<CalcDimension>& top
const std::optional<CalcDimension>& bottom, const std::optional<CalcDimension>& left,
const std::optional<CalcDimension>& right)
{
NG::PaddingProperty padding(
{ NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp) });
NG::PaddingProperty padding({
NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp), NG::CalcLength(0.0_vp)
});
if (left.has_value() && left.value().IsNonNegative()) {
padding.left = NG::CalcLength(left.value());
}

View File

@ -31,8 +31,7 @@ AnimatablePath& AnimatablePath::operator=(const AnimatablePath& newValue)
SetValue(newValue.GetValue());
return *this;
}
AnimationOption explicitAnim;
explicitAnim = context->GetExplicitAnimationOption();
AnimationOption explicitAnim = context->GetExplicitAnimationOption();
if (explicitAnim.IsValid()) {
SetAnimationOption(explicitAnim);
AnimateTo(newValue.GetValue());