-
Notifications
You must be signed in to change notification settings - Fork 105
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
clean: apply clang-tidy's modernize-use-using
(replace most typedef
)
#1908
clean: apply clang-tidy's modernize-use-using
(replace most typedef
)
#1908
Conversation
modernize-use-using
(replace most typedef`)modernize-use-using
(replace most typedef
)
727aba0
to
1fcf48b
Compare
1fcf48b
to
d15081e
Compare
typedef struct | ||
struct bgl_block | ||
{ | ||
unsigned type; | ||
unsigned length; | ||
char * data; | ||
} bgl_block; | ||
}; | ||
|
||
typedef struct | ||
struct bgl_entry | ||
{ | ||
std::string headword; | ||
std::string definition; | ||
std::string displayedHeadword; | ||
std::vector< std::string > alternates; | ||
} bgl_entry; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In C++, there is no need to typedef
again. The struct name can be directly used.
https://learn.microsoft.com/en-us/cpp/cpp/struct-cpp?view=msvc-170#using-a-structure
modernize-use-using
(replace most typedef
)modernize-use-using
(replace most typedef
)
2cae13f
to
fb45d2e
Compare
Quality Gate passedIssues Measures |
I feel
using
is a straight upgrade oftypedef
especially for long type names.There is only 2
typedef
left because that file is currently compiled as C.