Skip to content

Commit

Permalink
Make Project.addTestRunnerConfiguration() accept a const GeneratorSet…
Browse files Browse the repository at this point in the history
…tings argument
  • Loading branch information
kinke committed Jul 14, 2022
1 parent adb907d commit 281ee32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/dub/generators/build.d
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ string getObjSuffix(const scope ref BuildPlatform platform)
return platform.isWindows() ? ".obj" : ".o";
}

string computeBuildName(string config, GeneratorSettings settings, const string[][] hashing...)
string computeBuildName(string config, in GeneratorSettings settings, const string[][] hashing...)
{
import std.digest;
import std.digest.md;
Expand Down
4 changes: 2 additions & 2 deletions source/dub/project.d
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class Project {
Returns:
Name of the added test runner configuration, or null for base configurations with target type `none`
*/
string addTestRunnerConfiguration(GeneratorSettings settings, bool generate_main = true, string base_config = "", NativePath custom_main_file = NativePath())
string addTestRunnerConfiguration(in GeneratorSettings settings, bool generate_main = true, string base_config = "", NativePath custom_main_file = NativePath())
{
if (base_config.length == 0) {
// if a custom main file was given, favor the first library configuration, so that it can be applied
Expand All @@ -244,7 +244,7 @@ class Project {
if (!base_config.length) base_config = getDefaultConfiguration(settings.platform, true);
}

BuildSettings lbuildsettings = settings.buildSettings;
BuildSettings lbuildsettings = settings.buildSettings.dup;
addBuildSettings(lbuildsettings, settings, base_config, null, true);

if (lbuildsettings.targetType == TargetType.none) {
Expand Down

0 comments on commit 281ee32

Please sign in to comment.