diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-09-01 00:46:25 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-01 18:06:14 +0200 |
commit | 511822c9fe526feab73857f8298adf2469d16116 (patch) | |
tree | 9fd90d4da8b58d413e6413730e0f93e018381493 | |
parent | 0bd089b28295918ce07318d5de473101f97a7549 (diff) | |
download | serenity-511822c9fe526feab73857f8298adf2469d16116.zip |
HackStudio: Fix typo in C++ file extension mapping code
This looks like a copy past bug where we were checking "cc" twice
instead of checking for the equivalent header extension.
Found by Sonar Cloud.
-rw-r--r-- | Userland/DevTools/HackStudio/Language.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/Language.cpp b/Userland/DevTools/HackStudio/Language.cpp index c4d87f18f2..ea20a39adf 100644 --- a/Userland/DevTools/HackStudio/Language.cpp +++ b/Userland/DevTools/HackStudio/Language.cpp @@ -12,7 +12,7 @@ Language language_from_file_extension(const String& extension) { VERIFY(!extension.starts_with(".")); if (extension == "c" || extension == "cc" || extension == "cxx" || extension == "cpp" || extension == "c++" - || extension == "h" || extension == "cc" || extension == "hxx" || extension == "hpp" || extension == "h++") + || extension == "h" || extension == "hh" || extension == "hxx" || extension == "hpp" || extension == "h++") return Language::Cpp; if (extension == "js" || extension == "mjs" || extension == "json") return Language::JavaScript; |