Skip to content

Commit

Permalink
flexibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Dec 16, 2023
1 parent 06bf4a4 commit c372d56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Cmd/Build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static void parseMMOutput(
Logger::debug("");
}

void build(const Vec<String>& args) {
void build(Vec<String> args) {
if (!std::filesystem::exists("src")) {
throw std::runtime_error("src directory not found");
}
Expand Down
2 changes: 1 addition & 1 deletion src/Cmd/Build.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

#include "../Rustify.hpp"

void build(const Vec<String>& args);
void build(Vec<String> args);
void build_help();
4 changes: 2 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#define POAC_VERSION "0.6.0"

void help(const Vec<String>& args) {
void help(Vec<String> args) {
if (args.empty()) {
std::cout << "poac " << POAC_VERSION << '\n';
std::cout << "A package manager and build system for C++" << '\n';
Expand Down Expand Up @@ -71,7 +71,7 @@ int main(int argc, char* argv[]) {
return 1;
}

HashMap<StringRef, Fn<void(const Vec<String>&)>> cmds;
HashMap<StringRef, Fn<void(Vec<String>)>> cmds;
cmds["help"] = help;
cmds["build"] = build;

Expand Down

0 comments on commit c372d56

Please sign in to comment.