svalinn / DAGMC

Direct Accelerated Geometry Monte Carlo Toolkit
https://svalinn.github.io/DAGMC
Other
96 stars 61 forks source link

Making methods const where possible #906

Closed pshriwise closed 10 months ago

pshriwise commented 10 months ago

Description

This PR adds a const identifier to the cross-reference methods to translate between entity handle, ID, and index.

There are probably other methods that this identifier can be applied to, but I didn't search them all out and figured it made sense to change these for sure.

Motivation and Context

In downstream applications, it would be nice to be able to use const DagMC* when possible for safety. (see https://github.com/openmc-dev/openmc/pull/2687/commits/37a10fb74c1723df733035278af0a44c98dc92ee).

Behavior

No change in the behavior of the code here. Just improved practices.

gonuke commented 10 months ago

Can you rebase this to get the tests to run again on the new images?

pshriwise commented 10 months ago

Can you rebase this to get the tests to run again on the new images?

All set!

gonuke commented 10 months ago

Thanks @pshriwise