date = data->get_date();
if ((ii <= (row_count -1)) &&
((frq_sec == -1) || (date.before(limit_d)))) {
+ int changed = 0;
if (max == true) {
for (jj = 0; jj < col_count; jj++) {
if (calc->value_arr[jj] < data->value_arr[jj]) {
calc->value_arr[jj] = data->value_arr[jj];
+ changed = 1;
}
}
}
for (jj = 0; jj < col_count; jj++) {
if (data->value_arr[jj] < calc->value_arr[jj]) {
calc->value_arr[jj] = data->value_arr[jj];
+ changed = 1;
}
}
}
+ if (changed == 1) {
+ Date new_date;
+
+ new_date = data->get_date();
+ calc->set_date(&new_date);
+ }
}
if ((ii >= (row_count -1)) ||
((frq_sec != -1) && (date.before(limit_d) == false))) {
}
else {
in.open(fname_param.c_str());
- while (in.eof() == false) {
- getline(in, line);
- if (line.empty() == false) {
- if (o_data == NULL) {
- o_data = Data::parse_string(line);
+ if (in.is_open() == true) {
+ while (in.eof() == false) {
+ getline(in, line);
+ if (line.empty() == false) {
+ if (o_data == NULL) {
+ o_data = Data::parse_string(line);
+ }
+ prev_line = line;
}
- prev_line = line;
}
- }
- if (prev_line.empty() == false) {
- n_data = Data::parse_string(prev_line);
+ if (prev_line.empty() == false) {
+ n_data = Data::parse_string(prev_line);
+ }
}
}
}