Skip to content

Commit

Permalink
Merge pull request #6 from Desour/fix_deprecated_boost_filesystem_ext…
Browse files Browse the repository at this point in the history
…ension

Replace the calls to deprecated and removed boost::filesystem::extension()
  • Loading branch information
bkryza authored Sep 23, 2024
2 parents 4297619 + 7882bc7 commit 7d3ddc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/include_graph_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ void include_graph_parser_t::parse(include_graph_t &include_graph)
CXCompileCommand command =
clang_CompileCommands_getCommand(compile_commands, command_it);

std::string current_file{
boost::filesystem::path current_file{
clang_getCString(clang_CompileCommand_getFilename(command))};

// Skip compile commands for headers (e.g. precompiled headers)
if (boost::filesystem::extension(current_file).empty() ||
boost::filesystem::extension(current_file).find(".h") == 0) {
if (!current_file.has_extension() ||
current_file.extension().string().find(".h") == 0) {
continue;
}

Expand All @@ -106,7 +106,7 @@ void include_graph_parser_t::parse(include_graph_t &include_graph)
}

auto tu_path =
boost::filesystem::canonical(boost::filesystem::path(current_file));
boost::filesystem::canonical(current_file);

auto include_path_str = tu_path.string();
translation_units_.emplace(include_path_str);
Expand Down

0 comments on commit 7d3ddc8

Please sign in to comment.