Skip to content

Commit

Permalink
Add ".c" and ".cxx" file extensions support
Browse files Browse the repository at this point in the history
  • Loading branch information
crosire committed Mar 18, 2019
1 parent dd2ea55 commit 60410e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/blink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void blink::application::run()
continue;

const auto it = std::find_if(_source_files[i].begin(), _source_files[i].end(),
[](const auto &path) { return path.extension() == ".cpp"; });
[](const auto &path) { const auto ext = path.extension(); return ext == ".c" || ext == ".cpp" || ext == ".cxx"; });

if (it != _source_files[i].end())
{
Expand Down Expand Up @@ -166,7 +166,7 @@ void blink::application::run()

if (_source_dir.empty())
{
print(" Error: Could not determine project directory.");
print(" Error: Could not determine project directory. Make sure all source code files are on the same drive.");
return;
}

Expand Down Expand Up @@ -246,7 +246,7 @@ void blink::application::run()
_source_dir / std::wstring(info->FileName, info->FileNameLength / sizeof(WCHAR));

// Ignore changes to files that are not C++ source files
if (source_file.extension() != ".cpp")
if (const auto ext = source_file.extension(); ext != ".c" && ext != ".cpp" && ext != ".cxx")
continue;

// Ignore duplicated notifications by comparing times and skipping any changes that are not older than 3 seconds
Expand Down

0 comments on commit 60410e7

Please sign in to comment.