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.
This commit is contained in:
Brian Gianforcaro 2021-09-01 00:46:25 -07:00 committed by Andreas Kling
parent 0bd089b282
commit 511822c9fe
Notes: sideshowbarker 2024-07-18 04:56:13 +09:00

View file

@ -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;