Skip to content

Commit 2ba4878

Browse files
dyzhengclaude
andcommitted
fix: use C++11 compatible unique_ptr::reset instead of std::make_unique
The CI build uses C++11 where std::make_unique is not available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3ee0a52 commit 2ba4878

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/source_lcao/hamilt_lcao.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,8 @@ std::vector<HContainer<TR>*> HamiltLCAO<TK, TR>::getHR_vector()
484484
if (PARAM.inp.nspin == 2)
485485
{
486486
const int nnr = this->hRS2.size() / 2;
487-
this->hr_spin_up_ = std::make_unique<HContainer<TR>>(*this->hR, this->hRS2.data());
488-
this->hr_spin_dn_ = std::make_unique<HContainer<TR>>(*this->hR, this->hRS2.data() + nnr);
487+
this->hr_spin_up_.reset(new HContainer<TR>(*this->hR, this->hRS2.data()));
488+
this->hr_spin_dn_.reset(new HContainer<TR>(*this->hR, this->hRS2.data() + nnr));
489489
return {this->hr_spin_up_.get(), this->hr_spin_dn_.get()};
490490
}
491491
else

0 commit comments

Comments
 (0)