Skip to content

Commit 555733b

Browse files
Minor checks and formatting fixes
1 parent 78bf229 commit 555733b

File tree

6 files changed

+27
-22
lines changed

6 files changed

+27
-22
lines changed

Include/runcpp2/Data/BuildTypeHelper.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ namespace runcpp2
2121
bool GetOutputPath( const ghc::filesystem::path& buildDir,
2222
const std::string& scriptName,
2323
const Profile& profile,
24-
BuildType buildType,
25-
bool asExecutable,
24+
const BuildType buildType,
25+
const bool asExecutable,
2626
ghc::filesystem::path& outPath);
2727
}
2828
}

Include/runcpp2/Data/StageInfo.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ namespace runcpp2
5656
std::string& inOutSubstitutedString) const;
5757

5858
bool ConstructCommand( const SubstitutionMap& substitutionMap,
59-
bool isExecutable,
60-
BuildType buildType,
59+
const bool isExecutable,
60+
const BuildType buildType,
6161
std::string& outCommand) const;
6262

6363
bool ParseYAML_Node(ryml::ConstNodeRef& node, std::string outputTypeKeyName);

Src/Tests/Data/BuildTypeTest.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,11 @@ int main(int argc, char** argv)
8686
runcpp2::Data::FilesTypesInfo filesTypes;
8787
);
8888

89-
ssTEST_OUTPUT_ASSERT("Static build type",
90-
BuildTypeHelper::GetOutputFileProperties(filesTypes, BuildType::STATIC, false) == &filesTypes.StaticLinkFile);
89+
ssTEST_OUTPUT_ASSERT( "Static build type",
90+
BuildTypeHelper::GetOutputFileProperties( filesTypes,
91+
BuildType::STATIC,
92+
false),
93+
&filesTypes.StaticLinkFile);
9194
};
9295

9396
ssTEST_END_TEST_GROUP();

Src/runcpp2/Data/BuildTypeHelper.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace runcpp2
1313
if(buildType == BuildType::EXECUTABLE && asExecutable)
1414
return nullptr;
1515

16+
static_assert(static_cast<int>(BuildType::COUNT) == 4, "Update This");
1617
switch(buildType)
1718
{
1819
case BuildType::EXECUTABLE:
@@ -35,8 +36,8 @@ namespace runcpp2
3536
bool Data::BuildTypeHelper::GetOutputPath(const ghc::filesystem::path& buildDir,
3637
const std::string& scriptName,
3738
const Profile& profile,
38-
BuildType buildType,
39-
bool asExecutable,
39+
const BuildType buildType,
40+
const bool asExecutable,
4041
ghc::filesystem::path& outPath)
4142
{
4243
//For executable build type with executable flag, use platform-specific extension
@@ -50,8 +51,9 @@ namespace runcpp2
5051
return true;
5152
}
5253

53-
const FileProperties* fileTypeInfo =
54-
GetOutputFileProperties(profile.FilesTypes, buildType, asExecutable);
54+
const FileProperties* fileTypeInfo = GetOutputFileProperties( profile.FilesTypes,
55+
buildType,
56+
asExecutable);
5557
if(!fileTypeInfo)
5658
return false;
5759

Src/runcpp2/Data/StageInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ bool runcpp2::Data::StageInfo::PerformSubstituions( const SubstitutionMap& subst
313313
}
314314

315315
bool runcpp2::Data::StageInfo::ConstructCommand(const SubstitutionMap& substitutionMap,
316-
bool isExecutable,
317-
BuildType buildType,
316+
const bool isExecutable,
317+
const BuildType buildType,
318318
std::string& outCommand) const
319319
{
320320
ssLOG_FUNC_DEBUG();

Src/runcpp2/PipelineSteps.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,18 +176,18 @@ namespace
176176
}
177177

178178
bool GetOutputFileInfo( const ghc::filesystem::path& buildDir,
179-
const runcpp2::Data::ScriptInfo& scriptInfo,
180-
const runcpp2::Data::Profile& currentProfile,
181-
const std::string& scriptName,
182-
bool asExecutable,
183-
ghc::filesystem::path& outOutputPath)
179+
const runcpp2::Data::ScriptInfo& scriptInfo,
180+
const runcpp2::Data::Profile& currentProfile,
181+
const std::string& scriptName,
182+
const bool asExecutable,
183+
ghc::filesystem::path& outOutputPath)
184184
{
185185
if(!runcpp2::Data::BuildTypeHelper::GetOutputPath( buildDir,
186-
scriptName,
187-
currentProfile,
188-
scriptInfo.CurrentBuildType,
189-
asExecutable,
190-
outOutputPath))
186+
scriptName,
187+
currentProfile,
188+
scriptInfo.CurrentBuildType,
189+
asExecutable,
190+
outOutputPath))
191191
{
192192
ssLOG_ERROR("Extension or prefix not found in compiler profile for build type: " <<
193193
runcpp2::Data::BuildTypeToString(scriptInfo.CurrentBuildType));

0 commit comments

Comments
 (0)