From c9b4c5bd076a9c29b5eb5767f8ef6d77ad113597 Mon Sep 17 00:00:00 2001 From: Ye Luo Date: Tue, 11 May 2021 20:50:24 -0500 Subject: [PATCH] More const --- src/QMCWaveFunctions/Jastrow/DiffTwoBodyJastrowOrbital.h | 3 ++- src/QMCWaveFunctions/tests/test_DiffTwoBodyJastrowOrbital.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/QMCWaveFunctions/Jastrow/DiffTwoBodyJastrowOrbital.h b/src/QMCWaveFunctions/Jastrow/DiffTwoBodyJastrowOrbital.h index 6f3bfe11c2..b260a6c460 100644 --- a/src/QMCWaveFunctions/Jastrow/DiffTwoBodyJastrowOrbital.h +++ b/src/QMCWaveFunctions/Jastrow/DiffTwoBodyJastrowOrbital.h @@ -51,7 +51,8 @@ class DiffTwoBodyJastrowOrbital : public DiffWaveFunctionComponent public: // return for testing - std::vector& getPairFunctions() { return F; } + const std::vector& getPairFunctions() const { return F; } + ///constructor DiffTwoBodyJastrowOrbital(ParticleSet& p) : NumVars(0), my_table_ID_(p.addTable(p)) { diff --git a/src/QMCWaveFunctions/tests/test_DiffTwoBodyJastrowOrbital.cpp b/src/QMCWaveFunctions/tests/test_DiffTwoBodyJastrowOrbital.cpp index edc4f997ee..1774a92bd0 100644 --- a/src/QMCWaveFunctions/tests/test_DiffTwoBodyJastrowOrbital.cpp +++ b/src/QMCWaveFunctions/tests/test_DiffTwoBodyJastrowOrbital.cpp @@ -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& F = jorb.getPairFunctions(); + auto& F = jorb.getPairFunctions(); for (size_t i = 0; i < F.size(); ++i) CHECK(F[i] != nullptr); }