File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -350,12 +350,10 @@ ghc::filesystem::path Config::link_write(std::string &data_product){
350
350
351
351
if (config_writes_ ().IsSequence ()){
352
352
for (YAML::const_iterator it = config_writes_ ().begin (); it != config_writes_ ().end (); ++it) {
353
- YAML::Node write_ = *it;
354
-
355
- if (write_[" data_product" ]){
356
- if (write_[" data_product" ].as <std::string>() == data_product)
353
+ if (it->as <YAML::Node>()[" data_product" ]){
354
+ if (it->as <YAML::Node>()[" data_product" ].as <std::string>() == data_product)
357
355
{
358
- currentWrite = write_ ;
356
+ currentWrite = it-> as <YAML::Node>() ;
359
357
}
360
358
}
361
359
@@ -427,12 +425,10 @@ ghc::filesystem::path FDP::Config::link_read(std::string &data_product){
427
425
428
426
if (config_reads_ ().IsSequence ()){
429
427
for (YAML::const_iterator it = config_reads_ ().begin (); it != config_reads_ ().end (); ++it) {
430
- YAML::Node read_ = *it;
431
-
432
- if (read_[" data_product" ]){
433
- if (read_[" data_product" ].as <std::string>() == data_product)
428
+ if (it->as <YAML::Node>()[" data_product" ]){
429
+ if (it->as <YAML::Node>()[" data_product" ].as <std::string>() == data_product)
434
430
{
435
- currentRead = read_ ;
431
+ currentRead = it-> as <YAML::Node>() ;
436
432
}
437
433
}
438
434
Original file line number Diff line number Diff line change @@ -36,10 +36,6 @@ double read_point_estimate_from_toml(const ghc::filesystem::path var_address) {
36
36
}
37
37
38
38
std::string get_first_key_ (const toml::value data_table) {
39
- for (auto const & i : data_table.as_table ()) {
40
- return i.first ;
41
- }
42
-
43
- return " " ;
39
+ return data_table.as_table ().begin ()->first ;
44
40
}
45
41
}; // namespace FDP
You can’t perform that action at this time.
0 commit comments