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

Avoid std::cout and std::endl #276

Open
volkm opened this issue Aug 10, 2022 · 4 comments
Open

Avoid std::cout and std::endl #276

volkm opened this issue Aug 10, 2022 · 4 comments

Comments

@volkm
Copy link
Contributor

volkm commented Aug 10, 2022

Currently, some parts of the code are still using std::cout. We should revise them to use our custom macros such as STORM_LOG_INFO or STORM_PRINT_AND_LOG.

In addition, we opt to use \n instead of std::endl, see PR #178.
The files GradientDescentInstantiationSearcher.cpp and SparseDerivativeInstantiationModelChecker.cpp should be adapted accordingly.

@Shurtu-gal
Copy link

Hello,
I am Ashish Padhy (Sophomore at Bachelor's) and am kind of beginning my open source journey.
So can you please clarify how to choose the macro to replace std::cout .
Thanks for your help.

@tquatmann
Copy link
Member

PR #277 addressed the two files you mentioned. Someone should check for other misplaces occurences of std::cout

@Shurtu-gal the macros allow us to control the tool output on a global level. For example, we could easily implement a compile-time option that disables all output.

@Legoeggolas
Copy link
Contributor

If there are any other source files that require similar enhancements, I'd be very happy to help with them as well :D This issue helped me find a good example of macro use in a mature code base and I am grateful for that experience

@Shurtu-gal
Copy link

@tquatmann Thanks for the heads up.
Would be happy to contribute to other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants