Skip to content

Commit 0ee57e3

Browse files
committed
pass boolean by value instead of by reference
1 parent d569e38 commit 0ee57e3

File tree

14 files changed

+14
-14
lines changed

14 files changed

+14
-14
lines changed

source/module_md/FIRE.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void FIRE::second_half()
8585
ModuleBase::timer::tick("FIRE", "second_half");
8686
}
8787

88-
void FIRE::outputMD(std::ofstream &ofs, bool &cal_stress)
88+
void FIRE::outputMD(std::ofstream &ofs, bool cal_stress)
8989
{
9090
Verlet::outputMD(ofs, cal_stress);
9191

source/module_md/FIRE.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class FIRE : public Verlet
1212
void setup(ModuleESolver::ESolver *p_ensolve);
1313
void first_half();
1414
void second_half();
15-
void outputMD(std::ofstream &ofs, bool &cal_stress);
15+
void outputMD(std::ofstream &ofs, bool cal_stress);
1616
void write_restart();
1717
void restart();
1818
void check_force();

source/module_md/Langevin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void Langevin::second_half()
4545
ModuleBase::timer::tick("Langevin", "second_half");
4646
}
4747

48-
void Langevin::outputMD(std::ofstream &ofs, bool &cal_stress)
48+
void Langevin::outputMD(std::ofstream &ofs, bool cal_stress)
4949
{
5050
Verlet::outputMD(ofs, cal_stress);
5151
}

source/module_md/Langevin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Langevin : public Verlet
1212
void setup(ModuleESolver::ESolver *p_ensolve);
1313
void first_half();
1414
void second_half();
15-
void outputMD(std::ofstream &ofs, bool &cal_stress);
15+
void outputMD(std::ofstream &ofs, bool cal_stress);
1616
void write_restart();
1717
void restart();
1818
void post_force();

source/module_md/MSST.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void MSST::second_half()
164164
ModuleBase::timer::tick("MSST", "second_half");
165165
}
166166

167-
void MSST::outputMD(std::ofstream &ofs, bool &cal_stress)
167+
void MSST::outputMD(std::ofstream &ofs, bool cal_stress)
168168
{
169169
Verlet::outputMD(ofs, cal_stress);
170170
}

source/module_md/MSST.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class MSST : public Verlet
1212
void setup(ModuleESolver::ESolver *p_ensolve);
1313
void first_half();
1414
void second_half();
15-
void outputMD(std::ofstream &ofs, bool &cal_stress);
15+
void outputMD(std::ofstream &ofs, bool cal_stress);
1616
void write_restart();
1717
void restart();
1818
double extra_term();

source/module_md/NVE.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void NVE::second_half()
3636
ModuleBase::timer::tick("NVE", "second_half");
3737
}
3838

39-
void NVE::outputMD(std::ofstream &ofs, bool &cal_stress)
39+
void NVE::outputMD(std::ofstream &ofs, bool cal_stress)
4040
{
4141
Verlet::outputMD(ofs, cal_stress);
4242
}

source/module_md/NVE.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class NVE : public Verlet
1212
void setup(ModuleESolver::ESolver *p_ensolve);
1313
void first_half();
1414
void second_half();
15-
void outputMD(std::ofstream &ofs, bool &cal_stress);
15+
void outputMD(std::ofstream &ofs, bool cal_stress);
1616
void write_restart();
1717
void restart();
1818

source/module_md/NVT_ADS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void NVT_ADS::second_half()
6565
ModuleBase::timer::tick("NVT_ADS", "second_half");
6666
}
6767

68-
void NVT_ADS::outputMD(std::ofstream &ofs, bool &cal_stress)
68+
void NVT_ADS::outputMD(std::ofstream &ofs, bool cal_stress)
6969
{
7070
Verlet::outputMD(ofs, cal_stress);
7171
}

source/module_md/NVT_ADS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class NVT_ADS : public Verlet
1212
void setup(ModuleESolver::ESolver *p_ensolve);
1313
void first_half();
1414
void second_half();
15-
void outputMD(std::ofstream &ofs, bool &cal_stress);
15+
void outputMD(std::ofstream &ofs, bool cal_stress);
1616
void write_restart();
1717
void restart();
1818

0 commit comments

Comments
 (0)