itm
itm copied to clipboard
General `const` correctness
Prompted by #9, this pull request retrofits the ITM codebase with const
correctness wherever applicable. I used a static code analysis tool to evaluate the ITM and ITMDrvr source code, and then modified the code to use const
as much as possible. I tested the changes by compiling and using ITMDrvr to run the included example cases, to verify outputs have not changed.
Note for @wkozmaNTIA: I did not modify the C#/.NET wrapper to account for these changes, nor did I modify any version numbers. I'll leave these to you.
@blainNTIA looking back at this, with much more C++ experience compared to when I made the initial changes, I found many more instances where const correctness could be implemented. The static code analysis tool I initially used did not identify these cases, but I went through the functions to determine where const
was applicable. The changes I made included your suggestions and similar changes in many other places. Please take a look at the new changes and provide an updated review when you get a chance.
Also, I still have not made edits to the .NET wrapper, or tested the .NET wrapper for the C++ changes. I don't think any changes are needed in .NET based on the addition of const
in the C++ code, but we should test this before merging this PR.