Skip to content

Commit 6eec740

Browse files
Howard-Shao09dyzheng
andauthored
Refactor: replace C-style cast with static_cast in read_pp_complete.cpp (#7183)
Co-authored-by: dyzheng <zhengdy@bjaisi.com>
1 parent 7de58a0 commit 6eec740

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/source_cell/read_pp_complete.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void Pseudopot_upf::complete_default_atom(Atom_pseudo& pp)
140140
if (br)
141141
{
142142
// force msh to be odd for simpson integration
143-
pp.msh = 2 * (int)((pp.msh + 1) / 2) - 1; // 5
143+
pp.msh = 2 * static_cast<int>((pp.msh + 1) / 2) - 1; // Use static_cast instead of C-style cast for type safety
144144
}
145145
else
146146
{
@@ -161,4 +161,4 @@ void Pseudopot_upf::complete_default_vl(Atom_pseudo& pp)
161161
}
162162

163163
return;
164-
}
164+
}

0 commit comments

Comments
 (0)