From 718a53020a4abc8e1edea23877187e4437bfd00c Mon Sep 17 00:00:00 2001 From: Ye Luo Date: Sat, 4 Mar 2023 17:00:28 -0600 Subject: [PATCH] Fix warning. --- src/Estimators/tests/test_SizeLimitedDataQueue.cpp | 2 +- src/QMCDrivers/DMC/DMCRefEnergy.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Estimators/tests/test_SizeLimitedDataQueue.cpp b/src/Estimators/tests/test_SizeLimitedDataQueue.cpp index c06f6d5507..88925cff67 100644 --- a/src/Estimators/tests/test_SizeLimitedDataQueue.cpp +++ b/src/Estimators/tests/test_SizeLimitedDataQueue.cpp @@ -39,7 +39,7 @@ TEST_CASE("SizeLimitedDataQueue", "[estimators]") CHECK(Approx(avg[0]) == 1.444444444); } { - weight_and_energy.push({0.5, 3.0}); + weight_and_energy.push({0.5, {3.0}}); CHECK(weight_and_energy.size() == 3); auto avg = weight_and_energy.weighted_avg(); CHECK(Approx(avg[0]) == 1.5); diff --git a/src/QMCDrivers/DMC/DMCRefEnergy.cpp b/src/QMCDrivers/DMC/DMCRefEnergy.cpp index a71bb207ea..0ae22692ac 100644 --- a/src/QMCDrivers/DMC/DMCRefEnergy.cpp +++ b/src/QMCDrivers/DMC/DMCRefEnergy.cpp @@ -35,7 +35,7 @@ std::tuple DMCRefEnergy::getEnergyVariance() const void DMCRefEnergy::pushWeightEnergyVariance(FullPrecReal weight, FullPrecReal ene, FullPrecReal var) { if (scheme_ == DMCRefEnergyScheme::LIMITED_HISTORY) - energy_and_variance_.push({weight, ene, var}); + energy_and_variance_.push({weight, {ene, var}}); else { energy_hist_(ene);