Skip to content

Making methods const where possible#906

Merged
gonuke merged 2 commits into
svalinn:developfrom
pshriwise:xref-methods-const
Sep 16, 2023
Merged

Making methods const where possible#906
gonuke merged 2 commits into
svalinn:developfrom
pshriwise:xref-methods-const

Conversation

@pshriwise

Copy link
Copy Markdown
Member

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 openmc-dev/openmc@37a10fb).

Behavior

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

@gonuke gonuke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Any chance we can merge #904 first to make sure our testing is on the newest images?

@gonuke

gonuke commented Sep 14, 2023

Copy link
Copy Markdown
Member

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

@pshriwise

Copy link
Copy Markdown
Member Author

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

All set!

@gonuke

gonuke commented Sep 16, 2023

Copy link
Copy Markdown
Member

Thanks @pshriwise

@gonuke gonuke merged commit 7337760 into svalinn:develop Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants