Skip to content
Snippets Groups Projects
Commit 9edfa31f authored by Beerwerth, Randolf's avatar Beerwerth, Randolf
Browse files

Fix Use-after-free in RTTest

parent a4b26b60
No related branches found
No related tags found
No related merge requests found
...@@ -30,11 +30,11 @@ protected: ...@@ -30,11 +30,11 @@ protected:
EXPECT_NEAR(coeff1.t_r(1).real(), coeff2.t_r(1).real(), 1e-10); EXPECT_NEAR(coeff1.t_r(1).real(), coeff2.t_r(1).real(), 1e-10);
EXPECT_NEAR(coeff1.t_r(1).imag(), coeff2.t_r(1).imag(), 1e-10); EXPECT_NEAR(coeff1.t_r(1).imag(), coeff2.t_r(1).imag(), 1e-10);
} }
std::vector<ScalarRTCoefficients> getCoeffs(SpecularScalarTanhStrategy::coeffs_t&& inputCoeffs) std::vector<ScalarRTCoefficients> getCoeffs(ISpecularStrategy::coeffs_t&& inputCoeffs)
{ {
std::vector<ScalarRTCoefficients> result; std::vector<ScalarRTCoefficients> result;
for (auto& coeff : inputCoeffs) for (auto& coeff : inputCoeffs)
result.push_back(*dynamic_cast<const ScalarRTCoefficients*>(coeff.get())); result.push_back(*dynamic_cast<const ScalarRTCoefficients*>(coeff.release()));
return result; return result;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment