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
There are 17 places where "IConsoleError" can be used instead of "IConsolePrintF". #8853
Comments
Have you ever considered making Pull Requests yourself? These kind of things are easy things to start with in a codebase like OpenTTD, and it seems you have a good grasp on what should happen/change? Possibly also easier for yourself, as making these changes in code would have been faster than writing this ticket :D Not saying you have to btw, I am perfectly fine with these tickets; I was just wondering :) |
PS : not all cases you highlight are Example: |
Looking over the list, all instances except for the last 3 are this, and this is also most likely the reason they are not |
Is this issue stilll available ? |
I would like to work on it !! |
Version of OpenTTD
9c5a7d3
Expected result
The function
IConsoleError
behaves exactly the same as usingIConsolePrintF(CC_ERROR, "ERROR: %s", string);
, but is shorter and more concise.OpenTTD/src/console.cpp
Lines 168 to 171 in 9c5a7d3
Therefore,
IConsoleError(string)
should in general be used instead ofIConsolePrintF(CC_ERROR, "ERROR: %s", string)
.Actual result
The following 14 occurrences of
IConsolePrintF(CC_ERROR, "ERROR: %s", string)
still exist:OpenTTD/src/console_cmds.cpp
Lines 361 to 364 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Lines 385 to 388 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Lines 430 to 433 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 487 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 534 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 558 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 738 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 759 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 791 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 830 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 1577 in 9c5a7d3
Additionally, there are 3 additional occurrences of
IConsolePrint(CC_ERROR, "ERROR: %s", string)
:OpenTTD/src/console_cmds.cpp
Line 271 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 284 in 9c5a7d3
OpenTTD/src/console_cmds.cpp
Line 314 in 9c5a7d3
Steps to reproduce
Look in the source of
commands.cpp
for the above occurrences.The text was updated successfully, but these errors were encountered: