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

[Bug]: Grammatically incorrect comment in overflowsafe_type.hpp #9681

Closed
James103 opened this issue Nov 9, 2021 · 1 comment · Fixed by #9683
Closed

[Bug]: Grammatically incorrect comment in overflowsafe_type.hpp #9681

James103 opened this issue Nov 9, 2021 · 1 comment · Fixed by #9683

Comments

@James103
Copy link
Contributor

James103 commented Nov 9, 2021

Version of OpenTTD

0ad40ee

Expected result

The message should read:

/** 
 * Overflow safe template for integers, i.e. integers that will never overflow 
 * when you multiply the maximum value with 2, or add 2, or subtract something 
 * from the minimum value, etc. 
 * @param T     the type these integers are stored with. 
 */ 

In other words, add when between integers that will never overflow and you multiply the maximum value with 2, and update the line wrap accordingly.

Actual result

The message actually reads:

/**
* Overflow safe template for integers, i.e. integers that will never overflow
* you multiply the maximum value with 2, or add 2, or subtract something from
* the minimum value, etc.
* @param T the type these integers are stored with.
*/

Steps to reproduce

Check lines 23-28 of the file src/core/overflowsafe_type.hpp and notice the incorrect message.

@TrueBrain
Copy link
Member

It really is about time you learn how to make your own PRs @James103 ;) You can even do it from the GitHub interface if you so would like :)

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 a pull request may close this issue.

2 participants