已合并
【质量加固】修复若干符合编码规范规则和提交代码规范的问题 #4497
Fiee创建于 12 天前
【质量加固】修复若干符合编码规范规则和提交代码规范的问题 #4497
已合并
Fiee创建于 12 天前
Fiee
Fiee
12 天前

规则一8个
规则六3个

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Fiee 的贡献)
FieeFiee
12 天前 添加了label:enhancement
FieeFiee
12 天前 创建了 pull request,commit 56a43684
atomgit-bot
atomgit-bot
12 天前 评论:

变更摘要

本 PR 属于代码质量加固,针对若干不符合编码规范规则(规则一 8 处、规则六 3 处)的问题进行修复,主要内容包括:为 ModelHelper::CheckOsCpuInfoAndOppVersionDfxExtendInfo 的三个只读访问接口补充 const 限定符,并为 graph_external_weight_manager.h 补齐缺失的标准库头文件包含。

主要改动

  • ModelHelper::CheckOsCpuInfoAndOppVersion 增加 const 限定:在 model_helper.ccmodel_helper.h 中同步将该成员函数声明为 const,明确其不修改对象状态,符合编码规范中 const 正确性要求。
  • DfxExtendInfo 三个取值接口改为 const 成员函数:将 GetCtxTypeAddrGetCtxSizeAddrGetCtxIdAddrdfx_extend_info.ccdfx_extend_info.h 中统一加 const 限定,规范只读接口的声明。
  • 补齐 graph_external_weight_manager.h 头文件包含:新增 #include <string>#include <memory>#include <cstdint>,满足头文件自包含及规范要求的依赖声明。
likedislike
atomgit-bot
atomgit-bot
12 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
12 天前 添加了label:cann-cla/yes
此处折叠了90条消息 查看更多
CANN-robotCANN-robot成员
5 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
5 天前 添加了label:ci-pipeline-passed
张德鹏成员
4 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
4 天前 添加了label:approved
CANN-robotCANN-robot成员
4 天前 合入了pull request