Skip to content

Commit

Permalink
Update api
Browse files Browse the repository at this point in the history
  • Loading branch information
qubka committed Sep 17, 2024
1 parent 4408e6b commit 0897617
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ std::string_view GetPluginWebsite(PluginRef plugin) {
}

fs::path_view GetPluginBaseDir(PluginRef plugin) {
return plugin.GetBaseDir().c_str();
return plugin.GetBaseDir();
}

std::vector<std::string_view> GetPluginDependencies(PluginRef plugin) {
Expand All @@ -230,11 +230,7 @@ std::vector<std::string_view> GetPluginDependencies(PluginRef plugin) {
}

std::optional<fs::path_view> FindPluginResource(PluginRef plugin, fs::path_view path) {
auto opt = plugin.FindResource(path);
if (opt.has_value()) {
return opt->c_str();
}
return {};
return plugin.FindResource(path);
}

std::array<void*, 15> CppLanguageModule::_pluginApi = {
Expand Down

0 comments on commit 0897617

Please sign in to comment.