lamyj / odil

Odil is a C++11 library for the DICOM standard
Other
85 stars 21 forks source link

LGTM recommendation: Large object passed by value #89

Closed DimitriPapadopoulos closed 2 years ago

DimitriPapadopoulos commented 2 years ago

This parameter of type Selector is 128 bytes - consider passing a const pointer/reference instead. https://lgtm.com/projects/g/lamyj/odil/snapshot/5a2247ba9613a54e493954b70019dc19e5f6339d/files/wrappers/python/webservices/STOWRSRequest.cpp?sort=name&dir=ASC&mode=heatmap#x30cadaa14f031ec9:1

DimitriPapadopoulos commented 2 years ago

How would you feel fixing this by passing the "large object" by reference?

lamyj commented 2 years ago

A reference was definitely missing, thanks.