diff options
author | Eunki, Hong <eunkiki.hong@samsung.com> | 2022-10-06 20:10:50 +0900 |
---|---|---|
committer | Eunki, Hong <eunkiki.hong@samsung.com> | 2022-10-18 21:34:43 +0900 |
commit | 4387b0de650b6f0fd8b1b7c44b71841ca628d977 (patch) | |
tree | 45ef26192901b6eb6ff0f4d9500b07445bbc3310 /dali/internal/accessibility/bridge | |
parent | 38b2cd4c868982264a00fa6f16fa01bf136e81e8 (diff) | |
download | dali-adaptor-4387b0de650b6f0fd8b1b7c44b71841ca628d977.tar.gz dali-adaptor-4387b0de650b6f0fd8b1b7c44b71841ca628d977.tar.bz2 dali-adaptor-4387b0de650b6f0fd8b1b7c44b71841ca628d977.zip |
Minor coverity issue fixes
Fix some minor coverity issues that might has meanful
1. Implement missing move operation.
2. Remove float equal checks by ==, != operator.
3. unsigned int / unsigned char to uint32_t / uint8_t
4. Change missed value type (a.k.a float v = true;)
Change-Id: Ib6eb901919918488f2ff7085301e73a466b98019
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Diffstat (limited to 'dali/internal/accessibility/bridge')
-rw-r--r-- | dali/internal/accessibility/bridge/bridge-accessible.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/dali/internal/accessibility/bridge/bridge-accessible.cpp b/dali/internal/accessibility/bridge/bridge-accessible.cpp index 12366470d..31443ffa1 100644 --- a/dali/internal/accessibility/bridge/bridge-accessible.cpp +++ b/dali/internal/accessibility/bridge/bridge-accessible.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ #include <dali/internal/accessibility/bridge/bridge-accessible.h> // EXTERNAL INCLUDES +#include <dali/public-api/math/math-utils.h> + #include <algorithm> #include <iostream> @@ -60,7 +62,7 @@ std::vector<std::vector<Component*>> SplitLines(const std::vector<Component*>& c // Find first with non-zero area auto first = std::find_if(children.begin(), children.end(), [](Component* child) -> bool { auto extents = child->GetExtents(CoordinateType::WINDOW); - return extents.height != 0.0f && extents.width != 0.0f; + return !Dali::EqualsZero(extents.height) && !Dali::EqualsZero(extents.width); }); if(first == children.end()) @@ -78,7 +80,7 @@ std::vector<std::vector<Component*>> SplitLines(const std::vector<Component*>& c auto child = *it; rect = child->GetExtents(CoordinateType::WINDOW); - if(rect.height == 0.0f || rect.width == 0.0f) + if(Dali::EqualsZero(rect.height) || Dali::EqualsZero(rect.width)) { // Zero area, ignore continue; @@ -156,7 +158,7 @@ static bool IsObjectZeroSize(Component* obj) return false; } auto extents = obj->GetExtents(CoordinateType::WINDOW); - return extents.height == 0 || extents.width == 0; + return Dali::EqualsZero(extents.height) || Dali::EqualsZero(extents.width); } static bool IsObjectAcceptable(Component* obj) @@ -266,7 +268,6 @@ static std::string MakeIndent(unsigned int maxRecursionDepth) return std::string(GET_NAVIGABLE_AT_POINT_MAX_RECURSION_DEPTH - maxRecursionDepth, ' '); } - static bool IsRoleAcceptableWhenNavigatingNextPrev(Accessible* obj) { if(!obj) |