Skip to content

Commit b80444b

Browse files
committed
add const for Find_atom() in unittests
1 parent 736c1b6 commit b80444b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

source/module_elecstate/module_dm/test/test_dm_io.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void Grid_Driver::Find_atom(const UnitCell& ucell,
4848
const ModuleBase::Vector3<double>& tau,
4949
const int& T,
5050
const int& I,
51-
AdjacentAtomInfo* adjs)
51+
AdjacentAtomInfo* adjs) const
5252
{
5353
}
5454
Grid::Grid(const int& test_grid_in) : test_grid(test_grid_in)

source/module_elecstate/module_dm/test/tmp_mocks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void Grid_Driver::Find_atom(const UnitCell& ucell,
7878
const ModuleBase::Vector3<double>& tau,
7979
const int& T,
8080
const int& I,
81-
AdjacentAtomInfo* adjs)
81+
AdjacentAtomInfo* adjs) const
8282
{
8383
adjs->adj_num = ucell.nat - 1;
8484
adjs->adjacent_tau.resize(ucell.nat);

source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/test/tmp_mocks.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ void Grid_Driver::Find_atom(const UnitCell& ucell,
156156
const ModuleBase::Vector3<double>& tau,
157157
const int& T,
158158
const int& I,
159-
AdjacentAtomInfo* adjs) {
159+
AdjacentAtomInfo* adjs) const
160+
{
160161
adjs->adj_num = ucell.nat - 1;
161162
adjs->adjacent_tau.resize(ucell.nat);
162163
adjs->ntype.resize(ucell.nat, 0);

0 commit comments

Comments
 (0)