Skip to content

Commit d472cce

Browse files
author
abacus_fixer
committed
remove C++14 codes in tests
1 parent a3ed9ba commit d472cce

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

source/source_basis/module_ao/test/orb_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ void test_orb::set_single_c2o(int TA, int TB, int LA, int NA, int LB, int NB)
213213
{
214214
this->test_center2_orb11[TA][TB][LA][NA][LB].insert(std::make_pair(
215215
NB,
216-
std::make_unique<c2o>(ORB.Phi[TA].PhiLN(LA, NA), ORB.Phi[TB].PhiLN(LB, NB), OGT.MOT.pSB, Center2_MGT)));
216+
std::unique_ptr<c2o>(new c2o(ORB.Phi[TA].PhiLN(LA, NA), ORB.Phi[TB].PhiLN(LB, NB), OGT.MOT.pSB, Center2_MGT))));
217217
}
218218
double test_orb::randr(double Rmax)
219219
{

source/source_hsolver/test/diago_bpcg_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ class DiagoBPCGPrepare
136136
const std::vector<T> &h_mat = DIAGOTEST::hmatrix_local;
137137
auto hpsi_func = [h_mat, dim](T *psi_in, T *hpsi_out,
138138
const int ld_psi, const int nvec) {
139-
auto one = std::make_unique<T>(1.0);
140-
auto zero = std::make_unique<T>(0.0);
139+
std::unique_ptr<T> one(new T(1.0));
140+
std::unique_ptr<T> zero(new T(0.0));
141141
const T *one_ = one.get();
142142
const T *zero_ = zero.get();
143143

source/source_hsolver/test/diago_pexsi_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class PexsiPrepare
160160
std::cout << "nrow: " << hmtest.nrow << ", ncol: " << hmtest.ncol << ", nb: " << nb2d << std::endl;
161161
}
162162

163-
dh = std::make_unique<hsolver::DiagoPexsi<T>>(&po, PARAM.input.nspin, nlocal, PARAM.input.nelec);
163+
dh.reset(new hsolver::DiagoPexsi<T>(&po, PARAM.input.nspin, nlocal, PARAM.input.nelec));
164164
}
165165

166166
void distribute_data()

0 commit comments

Comments
 (0)