Fix: 通用规范告警

Signed-off-by: yangziyong <nsyangziyong@huawei.com>
This commit is contained in:
yangziyong 2024-07-03 11:12:25 +08:00
parent ba4abbf20f
commit d1395fa034
11 changed files with 29 additions and 16 deletions

View File

@ -21,10 +21,8 @@
namespace OHOS::Ace::NG {
namespace {
constexpr int32_t VIDEO_NODE_INDEX = 0;
constexpr int32_t IMAGE_NODE_INDEX = 1;
} // namespace
class ACE_EXPORT MovingPhotoNode : public FrameNode {
DECLARE_ACE_TYPE(MovingPhotoNode, FrameNode);

View File

@ -13,7 +13,8 @@
* limitations under the License.
*/
#pragma once
#ifndef FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_JSVIEW_JS_CONTENT_SLOT_H
#define FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_JSVIEW_JS_CONTENT_SLOT_H
#include "base/memory/referenced.h"
#include "bridge/declarative_frontend/engine/bindings_defines.h"
@ -42,3 +43,4 @@ public:
};
} // namespace OHOS::Ace::Framework
#endif // FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_JSVIEW_JS_CONTENT_SLOT_H

View File

@ -40,7 +40,7 @@
#define ACE_UPDATE_NODE_LAYOUT_PROPERTY(target, name, value, frameNode) \
do { \
CHECK_NULL_VOID(frameNode); \
auto cast##target = frameNode->GetLayoutPropertyPtr<target>(); \
auto cast##target = (frameNode)->GetLayoutPropertyPtr<target>(); \
if (cast##target) { \
cast##target->Update##name(value); \
} \
@ -70,7 +70,7 @@
#define ACE_UPDATE_NODE_PAINT_PROPERTY(target, name, value, frameNode) \
do { \
CHECK_NULL_VOID(frameNode); \
auto cast##target = frameNode->GetPaintPropertyPtr<target>(); \
auto cast##target = (frameNode)->GetPaintPropertyPtr<target>(); \
if (cast##target) { \
cast##target->Update##name(value); \
} \
@ -100,7 +100,7 @@
#define ACE_UPDATE_NODE_RENDER_CONTEXT(name, value, frameNode) \
do { \
CHECK_NULL_VOID(frameNode); \
const auto& target = frameNode->GetRenderContext(); \
const auto& target = (frameNode)->GetRenderContext(); \
if (target) { \
target->Update##name(value); \
} \
@ -170,7 +170,7 @@
#define ACE_RESET_NODE_RENDER_CONTEXT(target, name, frameNode) \
do { \
CHECK_NULL_VOID(frameNode); \
const auto& cast##target = frameNode->GetRenderContext(); \
const auto& cast##target = (frameNode)->GetRenderContext(); \
CHECK_NULL_VOID(cast##target); \
cast##target->Reset##name(); \
} while (false)

View File

@ -22,11 +22,10 @@
#include "core/components_ng/pattern/video/video_pattern.h"
namespace OHOS::Ace::NG {
namespace {
constexpr int32_t PREVIEW_IMAGE_INDEX = 1;
constexpr int32_t CONTROLLER_ROW_INDEX = 2;
constexpr int32_t MEDIA_COLUMN_INDEX = 0;
} // namespace
class ACE_EXPORT VideoNode : public FrameNode {
DECLARE_ACE_TYPE(VideoNode, FrameNode);

View File

@ -13,7 +13,8 @@
* limitations under the License.
*/
#pragma once
#ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_SYNTAX_CONTENT_SLOT_MODEL_NG_H
#define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_SYNTAX_CONTENT_SLOT_MODEL_NG_H
#include "core/components_ng/syntax/node_content.h"
@ -22,3 +23,4 @@ namespace OHOS::Ace::NG::ContentSlotModel {
void Create(NodeContent* content);
} // namespace OHOS::Ace::NG::ContentSlotModel
#endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_SYNTAX_CONTENT_SLOT_MODEL_NG_H

View File

@ -13,7 +13,8 @@
* limitations under the License.
*/
#pragma once
#ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_SYNTAX_CONTENT_SLOT_NODE_H
#define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_SYNTAX_CONTENT_SLOT_NODE_H
#include <cstdint>
@ -81,3 +82,4 @@ private:
};
} // namespace OHOS::Ace::NG
#endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_SYNTAX_CONTENT_SLOT_NODE_H

View File

@ -13,7 +13,8 @@
* limitations under the License.
*/
#pragma once
#ifndef FRAMEWORKS_CORE_INTERFACES_NATIVE_NODE_NODE_COMMON_MODIFIER_H
#define FRAMEWORKS_CORE_INTERFACES_NATIVE_NODE_NODE_COMMON_MODIFIER_H
#include "core/interfaces/native/node/node_api.h"
@ -48,3 +49,4 @@ void ResetOnTouchIntercept(ArkUINodeHandle node);
void ResetOnHover(ArkUINodeHandle node);
void ResetOnMouse(ArkUINodeHandle node);
} // namespace OHOS::Ace::NG::NodeModifier
#endif // FRAMEWORKS_CORE_INTERFACES_NATIVE_NODE_NODE_COMMON_MODIFIER_H

View File

@ -13,7 +13,8 @@
* limitations under the License.
*/
#pragma once
#ifndef FRAMEWORKS_CORE_INTERFACES_NATIVE_NODE_NODE_SCROLL_MODIFIER_H
#define FRAMEWORKS_CORE_INTERFACES_NATIVE_NODE_NODE_SCROLL_MODIFIER_H
#include "core/interfaces/native/node/node_api.h"
@ -40,3 +41,4 @@ void ResetOnScrollEdge(ArkUINodeHandle node);
void ResetOnScrollReachStart(ArkUINodeHandle node);
void ResetOnScrollReachEnd(ArkUINodeHandle node);
} // namespace OHOS::Ace::NG::NodeModifier
#endif // FRAMEWORKS_CORE_INTERFACES_NATIVE_NODE_NODE_SCROLL_MODIFIER_H

View File

@ -13,7 +13,8 @@
* limitations under the License.
*/
#pragma once
#ifndef FRAMEWORKS_CORE_INTERFACES_NATIVE_NODE_NODE_TEXT_INPUT_MODIFIER_H
#define FRAMEWORKS_CORE_INTERFACES_NATIVE_NODE_NODE_TEXT_INPUT_MODIFIER_H
#include "core/interfaces/native/node/node_api.h"
@ -44,3 +45,4 @@ namespace OHOS::Ace::NG::NodeModifier {
void ResetTextInputOnTextContentScroll(ArkUINodeHandle node);
} // namespace OHOS::Ace::NG::NodeModifier
#endif // FRAMEWORKS_CORE_INTERFACES_NATIVE_NODE_NODE_TEXT_INPUT_MODIFIER_H

View File

@ -13,10 +13,12 @@
* limitations under the License.
*/
#pragma once
#ifndef FRAMEWORKS_INTERFACE_INNER_API_NATIVE_NODE_NODE_XCOMPONENT_MODIFIER_H
#define FRAMEWORKS_INTERFACE_INNER_API_NATIVE_NODE_NODE_XCOMPONENT_MODIFIER_H
#include "core/interfaces/native/node/node_api.h"
namespace OHOS::Ace::NG::NodeModifier {
const ArkUIXComponentModifier* GetXComponentModifier();
} // namespace OHOS::Ace::NG::NodeModifier
#endif // FRAMEWORKS_INTERFACE_INNER_API_NATIVE_NODE_NODE_XCOMPONENT_MODIFIER_H

View File

@ -13,7 +13,8 @@
* limitations under the License.
*/
#pragma once
#ifndef ARKUI_NATIVE_NODE_EVENT_CONVERTER_H
#define ARKUI_NATIVE_NODE_EVENT_CONVERTER_H
#include "native_compatible.h"
#include "native_node.h"
@ -59,3 +60,4 @@ int32_t ConvertToCMouseActionType(int32_t originActionType);
int32_t ConvertToCMouseEventButtonType(int32_t originButtonType);
}; // namespace OHOS::Ace::NodeModel
#endif // ARKUI_NATIVE_NODE_EVENT_CONVERTER_H