Replace C-style type conversions with C++ casts
678098 opened this issue · 4 comments
Is there an existing proposal for this?
- I have searched the existing proposals
Is your feature request related to a problem?
There are several places where C-style conversions are used.
Search the codebase for (double)
:
mwcst_printutil.cpp - 2
mwcst_statutil.cpp - 3
mwcu_printutil.t.cpp - 3
It's possible to find some conversions by searching for (int)
too, but this search shows more false alarms and unrelated (int)
usage. There are still conversions to be fixed, like:
int BasicTableInfoProvider::numColumns(int level) const
{
if (level == 0) {
return (int)d_columns.size();
}
else {
return (int)d_columnGroups.size();
}
}
Another possible searches: int(
, double(
(with a space in the beginning)
Describe the solution you'd like
Use static_cast
Warning: there might be some auto-generated files with C-style conversions, usually with a name ending with messages.cpp
or messages.h
, don't need to modify it.
Alternatives you considered
No response
Hi, I would be happy to work on this issue once this comment is acknowledged.
Is there a reason why the .vscode/ directory has been excluded from .gitignore ? May I add this ?
Is there a reason why the .vscode/ directory has been excluded from .gitignore ? May I add this ?
Yes, updating .gitignore
would be good