Skip to content

Commit

Permalink
More const
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-luo committed May 12, 2021
1 parent 3edf75b commit c9b4c5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/QMCWaveFunctions/Jastrow/DiffTwoBodyJastrowOrbital.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class DiffTwoBodyJastrowOrbital : public DiffWaveFunctionComponent

public:
// return for testing
std::vector<FT*>& getPairFunctions() { return F; }
const std::vector<FT*>& getPairFunctions() const { return F; }

///constructor
DiffTwoBodyJastrowOrbital(ParticleSet& p) : NumVars(0), my_table_ID_(p.addTable(p))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ TEST_CASE("DiffTwoBodyJastrowOrbital Jastrow three particles of three types", "[
// setting u,p doesn't set d,p
jorb.addFunc(1, 2, &j2b);

std::vector<FakeJastrow*>& F = jorb.getPairFunctions();
auto& F = jorb.getPairFunctions();
for (size_t i = 0; i < F.size(); ++i)
CHECK(F[i] != nullptr);
}
Expand Down

0 comments on commit c9b4c5b

Please sign in to comment.