avoid shared ptr copy

This commit is contained in:
Joachim Schoeberl 2025-01-02 20:51:11 +01:00
parent 3b3491a597
commit 643898c5e2

View File

@ -507,7 +507,7 @@ namespace netgen
/// ///
LocalH & LocalHFunction (int layer=1) { return * lochfunc[layer-1]; } LocalH & LocalHFunction (int layer=1) { return * lochfunc[layer-1]; }
shared_ptr<LocalH> GetLocalH(int layer=1) const shared_ptr<LocalH> & GetLocalH(int layer=1) const
{ {
if(lochfunc.Size() == 1) if(lochfunc.Size() == 1)
return lochfunc[0]; return lochfunc[0];