mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
Userland: Change typedef to using directive
Problem: - `typedef`s are read backwards making it confusing. - `using` statements can be used in template aliases. - `using` provides similarity to most other C++ syntax. - C++ core guidelines say to prefer `using` over `typedef`: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rt-using Solution: - Switch these where appropriate.
This commit is contained in:
parent
800ea8ea96
commit
68f76b9e37
6 changed files with 6 additions and 7 deletions
|
@ -17,6 +17,5 @@ enum class BreakpointChange {
|
|||
Removed,
|
||||
};
|
||||
|
||||
typedef Function<void(const String& file, size_t line, BreakpointChange)> BreakpointChangeCallback;
|
||||
|
||||
using BreakpointChangeCallback = Function<void(const String& file, size_t line, BreakpointChange)>;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
namespace HackStudio {
|
||||
|
||||
// A "GitFileAction" is either the staging or the unstaging of a file.
|
||||
typedef Function<void(const LexicalPath& file)> GitFileActionCallback;
|
||||
using GitFileActionCallback = Function<void(const LexicalPath& file)>;
|
||||
|
||||
class GitFilesView : public GUI::ListView {
|
||||
C_OBJECT(GitFilesView)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
namespace HackStudio {
|
||||
|
||||
typedef Function<void(const String& original_content, const String& diff)> ViewDiffCallback;
|
||||
using ViewDiffCallback = Function<void(const String& original_content, const String& diff)>;
|
||||
|
||||
class GitWidget final : public GUI::Widget {
|
||||
C_OBJECT(GitWidget)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue