Skip to content

Commit

Permalink
add const for toString() method (#16685)
Browse files Browse the repository at this point in the history
* add const for toString() method

* fix error
  • Loading branch information
0-v-0 authored Jul 12, 2024
1 parent a6f0a84 commit 82eee6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/src/build.d
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ void runMain(string[] args)
bool calledFromMake = false;
auto res = getopt(args,
"j|jobs", "Specifies the number of jobs (commands) to run simultaneously (default: %d)".format(totalCPUs), &jobs,
"v|verbose", "Verbose command output", (cast(bool*) &verbose),
"f|force", "Force run (ignore timestamps and always run all tests)", (cast(bool*) &force),
"d|dry-run", "Print commands instead of executing them", (cast(bool*) &dryRun),
"v|verbose", "Verbose command output", cast(bool*) &verbose,
"f|force", "Force run (ignore timestamps and always run all tests)", cast(bool*) &force,
"d|dry-run", "Print commands instead of executing them", cast(bool*) &dryRun,
"called-from-make", "Calling the build script from the Makefile", &calledFromMake
);
void showHelp()
Expand Down Expand Up @@ -2345,7 +2345,7 @@ void installRelativeFiles(T)(string targetDir, string sourceBase, T files, uint
{
string name;
string relativeName;
string toString() { return relativeName; }
string toString() const { return relativeName; }
}
FileToCopy[][string] filesByDir;
foreach (file; files)
Expand Down

0 comments on commit 82eee6f

Please sign in to comment.