Skip to content

Commit 76e4f68

Browse files
committed
review comments #1
1 parent df8bd77 commit 76e4f68

3 files changed

Lines changed: 3 additions & 10 deletions

File tree

src/config/source/yaml_file.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,9 @@ namespace {
1919

2020
bool isSequenceOfScalars(const YAML::Node& node) {
2121
if (!node.IsSequence()) {
22-
SPDLOG_TRACE("isSequenceOfScalars = false, node is not a sequence");
2322
return false;
2423
}
25-
for (auto element : node) {
26-
if (!element.IsScalar()) {
27-
SPDLOG_TRACE("isSequenceOfScalars = false, list element is not a string");
28-
return false;
29-
}
30-
}
31-
return true;
24+
return std::ranges::all_of(node, [](const auto& element) { return element.IsScalar(); });
3225
}
3326

3427
bool isProperSingularValue(const YAML::Node& node) {

src/silo/initialize/initializer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static const std::string UNALIGNED_NUCLEOTIDE_SEQUENCE_PREFIX = "unaligned_";
231231
silo::schema::DatabaseSchema Initializer::createSchemaFromConfigFiles(
232232
config::DatabaseConfig database_config,
233233
ReferenceGenomes reference_genomes,
234-
std::map<std::filesystem::path, common::LineageTreeAndIdMap> lineage_tree,
234+
std::map<std::filesystem::path, common::LineageTreeAndIdMap> lineage_trees,
235235
common::PhyloTree phylo_tree_file,
236236
bool without_unaligned_sequences
237237
) {

src/silo/initialize/initializer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Initializer {
1616
static silo::schema::DatabaseSchema createSchemaFromConfigFiles(
1717
config::DatabaseConfig database_config,
1818
ReferenceGenomes reference_genomes,
19-
std::map<std::filesystem::path, common::LineageTreeAndIdMap> lineage_tree,
19+
std::map<std::filesystem::path, common::LineageTreeAndIdMap> lineage_trees,
2020
common::PhyloTree phylo_tree_file,
2121
bool without_unaligned_columns
2222
);

0 commit comments

Comments
 (0)