diff options
author | Lenny Maiorani <lenny@colorado.edu> | 2021-05-20 17:27:29 -0600 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-05-21 10:07:22 +0100 |
commit | 68f76b9e3750c8f4e5e3ee8c3d346772ce6d3593 (patch) | |
tree | 2ccb3f1312800accf500f26468f87002a9aa752e /Userland/DevTools/HackStudio/Git | |
parent | 800ea8ea969835297dc7e7da345a45b9dc5e751a (diff) | |
download | serenity-68f76b9e3750c8f4e5e3ee8c3d346772ce6d3593.zip |
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.
Diffstat (limited to 'Userland/DevTools/HackStudio/Git')
-rw-r--r-- | Userland/DevTools/HackStudio/Git/GitFilesView.h | 2 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/Git/GitWidget.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/HackStudio/Git/GitFilesView.h b/Userland/DevTools/HackStudio/Git/GitFilesView.h index 83df71e95b..0901e4787e 100644 --- a/Userland/DevTools/HackStudio/Git/GitFilesView.h +++ b/Userland/DevTools/HackStudio/Git/GitFilesView.h @@ -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) diff --git a/Userland/DevTools/HackStudio/Git/GitWidget.h b/Userland/DevTools/HackStudio/Git/GitWidget.h index 608acea3fc..7bb852022b 100644 --- a/Userland/DevTools/HackStudio/Git/GitWidget.h +++ b/Userland/DevTools/HackStudio/Git/GitWidget.h @@ -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) |