0824fixcoddyWarning

Signed-off-by: worker0217 <linhao54@huawei.com>
Change-Id: Id076b93c32949c70f9d5302ea7f622afc067eb4d
This commit is contained in:
worker0217 2024-08-24 14:10:53 +08:00
parent 0bc0b4cd17
commit 6b59984940
2 changed files with 7 additions and 1 deletions

View File

@ -135,8 +135,12 @@ OrderResult DateTimeSequence::GetAmPmTimeOrder(const std::string& locale)
}
icu::DateTimePatternGenerator* gen = icu::DateTimePatternGenerator::createInstance(localeObj, status);
icu::UnicodeString skeleton("h");
if (gen == nullptr) {
orderResult.amPmTimeOrder = "-1";
return orderResult;
}
icu::UnicodeString resultStr = gen->getBestPattern(skeleton, status);
if (U_FAILURE(status) || gen == nullptr) {
if (U_FAILURE(status)) {
orderResult.amPmTimeOrder = "-1";
return orderResult;
}

View File

@ -742,6 +742,7 @@ void SelectModelNG::ResetBuilderFunc(FrameNode* frameNode)
void SelectModelNG::SetBuilderFunc(FrameNode* frameNode, NG::SelectMakeCallback&& makeFunc)
{
CHECK_NULL_VOID(frameNode);
auto pattern = frameNode->GetPattern<SelectPattern>();
CHECK_NULL_VOID(pattern);
auto menuNode = pattern->GetMenuNode();
@ -753,6 +754,7 @@ void SelectModelNG::SetBuilderFunc(FrameNode* frameNode, NG::SelectMakeCallback&
void SelectModelNG::SetChangeValue(FrameNode* frameNode, int index, const std::string& value)
{
CHECK_NULL_VOID(frameNode);
auto pattern = frameNode->GetPattern<SelectPattern>();
CHECK_NULL_VOID(pattern);
pattern->SetItemSelected(index, value);