netgen icon indicating copy to clipboard operation
netgen copied to clipboard

libsrc/geom2d/csg2d.cpp:1736: Wpessimizing-move

Open dcb314 opened this issue 3 years ago • 0 comments

Recent development versions of gcc can be made to say:

/home/dcb36/rpmbuild/BUILD/netgen-6.2.2105/libsrc/geom2d/csg2d.cpp:1736:19: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]

Source code is

return std::move(res);

If the code is rewritten, then it might run a bit faster.

dcb314 avatar Aug 22 '22 08:08 dcb314