未验证 提交 465b43e9 编写于 作者: G gouzil 提交者: GitHub

[clang-tidy] Open bugprone-integer-division Check (#56246)

上级 8fc9a817
......@@ -14,7 +14,7 @@ Checks: '
-bugprone-inaccurate-erase,
-bugprone-incorrect-roundings,
-bugprone-infinite-loop,
-bugprone-integer-division,
bugprone-integer-division,
-bugprone-macro-repeated-side-effects,
-bugprone-misplaced-operator-in-strlen-in-alloc,
-bugprone-misplaced-widening-cast,
......
......@@ -29,7 +29,7 @@ namespace paddle {
namespace framework {
namespace details {
static constexpr double kMB = 1 / (1024 * 1024);
static constexpr double kMB = 1.0 / (1024.0 * 1024.0);
static void GetTensors(Variable *var,
std::unordered_set<phi::DenseTensor *> *tensor_set) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册