mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
fix: iterate over SO headers instead of values during initialization
This commit is contained in:
parent
29fbbc657b
commit
8fd537b6a5
@ -12,6 +12,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <limits>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -234,13 +235,11 @@ void PhreeqcMatrix::initialize() {
|
|||||||
|
|
||||||
const auto &headers = this->_m_selected_output_parser->getHeader();
|
const auto &headers = this->_m_selected_output_parser->getHeader();
|
||||||
|
|
||||||
for (std::size_t i = 0; i < selected_output_values.size(); i++) {
|
for (const auto &hdr_str : headers) {
|
||||||
elements.push_back({headers[i],
|
elements.push_back(
|
||||||
PhreeqcMatrix::PhreeqcComponent::SELECTED_OUTPUT,
|
{hdr_str, PhreeqcMatrix::PhreeqcComponent::SELECTED_OUTPUT, 0});
|
||||||
selected_output_values[i]});
|
|
||||||
base_names.push_back(
|
base_names.push_back(
|
||||||
{PhreeqcMatrix::base_names::Components::SELECTED_OUTPUT,
|
{PhreeqcMatrix::base_names::Components::SELECTED_OUTPUT, hdr_str});
|
||||||
headers[i]});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_m_map[id] = elements;
|
_m_map[id] = elements;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user