Skip to content

修复fix_any.h在cpplint上的报错#75438

Merged
wanghuancoder merged 6 commits into
PaddlePaddle:developfrom
ApricityXX:fix_any.h
Sep 24, 2025
Merged

修复fix_any.h在cpplint上的报错#75438
wanghuancoder merged 6 commits into
PaddlePaddle:developfrom
ApricityXX:fix_any.h

Conversation

@ApricityXX

@ApricityXX ApricityXX commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

修复fix_any.h当前文件在cpplint上的报错,主要涉及到:

  • 版权声明
  • TODO 注释必须带责任人
  • explicit 修饰单参数构造函数
  • 对解引用的值再取地址添加括号逻辑清晰
  • 不推荐函数参数是非 const 引用,添加const引用

注:

  • 由于54行工具误报,添加了// NOLINT(runtime/explicit)
  • 24行// TODO(name): add BOOST_TYPEID_COMPARE_BY_NAME to config.hpp中的(name)请改为实际id
  • 129行添加了// NOLINT(runtime/explicit)boost::any 的设计就是按值返回,按照cpplint如果修改成const会导致和下面函数定义重复,如果改成指针,会改变接口语义,调用处全都要改

@paddle-bot

paddle-bot Bot commented Sep 22, 2025

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot Bot added the contributor External developers label Sep 22, 2025

@wanghuancoder wanghuancoder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wanghuancoder wanghuancoder merged commit fb19313 into PaddlePaddle:develop Sep 24, 2025
101 of 105 checks passed
wanglezz pushed a commit to wanglezz/Paddle that referenced this pull request Sep 25, 2025
* fix_any.h

* test2

* test3

* test4

* test5

* test6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants