Skip to content

Commit

Permalink
🧼 Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Feb 26, 2024
1 parent 1c631ef commit 27aeb46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/open/open.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
namespace Cool {

/// Opens the link in the user's default web browser, or the folder in the folder explorer, or the file in the default configured software.
void open(const char* link);
void open(const char* link_or_path);

} // namespace Cool
12 changes: 6 additions & 6 deletions src/open.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#include <shellapi.h>

namespace Cool {
void open(const char* link)
void open(const char* link_or_path)
{
ShellExecuteA(nullptr, nullptr, link, nullptr, nullptr, SW_SHOW);
ShellExecuteA(nullptr, "open", link_or_path, nullptr, nullptr, SW_SHOWNORMAL);
}
} // namespace Cool

Expand All @@ -22,9 +22,9 @@ void open(const char* link)
#include <string>

namespace Cool {
void open(const char* link)
void open(const char* link_or_path)
{
system((std::string{"xdg-open "} + link).c_str());
system((std::string{"xdg-open "} + link_or_path).c_str());
}
} // namespace Cool

Expand All @@ -35,9 +35,9 @@ void open(const char* link)
#include <string>

namespace Cool {
void open(const char* link)
void open(const char* link_or_path)
{
system((std::string{"open "} + link).c_str());
system((std::string{"open "} + link_or_path).c_str());
}
} // namespace Cool

Expand Down

0 comments on commit 27aeb46

Please sign in to comment.