Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched some warning messages from deprecated function to boost::format #1298

Conversation

markus-jehl
Copy link
Contributor

The deprecated warning function ignores verbosity. Therefore, this PR is switching selected calls over to the new warning function.

Changes in this pull request

Changed some calls to deprecated warning function to new warning function using boost::format.

Testing performed

Built and loaded proj data object that triggered some warnings. After changing verbosity these warnings were no longer printed.

Related issues

fixes some instances of #1286

Checklist before requesting a review

  • I have performed a self-review of my code
  • [] I have added docstrings/doxygen in line with the guidance in the developer guide
  • [] I have implemented unit tests that cover any new or modified functionality (if applicable)
  • The code builds and runs on my machine
  • [] documentation/release_XXX.md has been updated with any functionality change (if applicable)

Copy link
Collaborator

@KrisThielemans KrisThielemans left a comment

Choose a reason for hiding this comment

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

It's a bit unfortunate to have to explicitly cast to std::string. What about adding another overload

void warning(const char * const m) { warning(std::string(m)); }

or something similar as work-around. This would catch all instances that don't have extra arguments without needing to change the actual code.

@markus-jehl
Copy link
Contributor Author

Sure, that's fine with me as well. Will change.

@markus-jehl
Copy link
Contributor Author

unfortunately it doesn't compile because it says the call to "warning" is ambiguous: it doesn't know which deprecated function to call...
I would propose to keep this PR as is and then remove the deprecated implementation once and for all after the TOF merge.

@KrisThielemans KrisThielemans merged commit fd9ad11 into UCL:master Dec 14, 2023
5 checks passed
@markus-jehl markus-jehl deleted the issue/1286-many-calls-to-deprecated-warning-function branch January 29, 2024 13:41
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