Skip to content

ATLASRECTS-5609: Migrate IMaterialEffectsUpdator return types to smart pointers

In the existing code, the IMaterialEffectsUpdator methods return raw pointers to TrackParameters. This is most likely an artifact of the bad old days where we didn't have proper pointer ownership mechanics built into the C++ standard. We now live in more enlightened times and returning raw pointers from methods which assume the caller to assume ownership of the returned value is not as expressive in terms of ownership semantics as one might like.

In merge request !35528 (merged), the interface was already modified such that it now guarantees non-aliasing return values, but the ownership semantics are still not there. This commit adds those semantics such that it is much clearer to the user of the interface that the caller should assume ownership of the returned value. After all, they don't have much choice: the compiler will scream at them unless they explicitly release the unique pointer.

Relates to ATLASRECTS-5614.

Resolves ATLASRECTS-5609.

Edited by Stephen Nicholas Swatman

Merge request reports