Bugfix: must have map for special fields for first epoch available after construction.

This commit is contained in:
Atgeirr Flø Rasmussen
2012-06-15 10:49:44 +02:00
parent 6c4b799925
commit b99ef7a25a

View File

@@ -284,7 +284,8 @@ EclipseGridParser::EclipseGridParser()
: current_reading_mode_(Regular), : current_reading_mode_(Regular),
start_date_(boost::date_time::not_a_date_time), start_date_(boost::date_time::not_a_date_time),
current_time_days_(0.0), current_time_days_(0.0),
current_epoch_(0) current_epoch_(0),
special_field_by_epoch_(1)
{ {
} }
@@ -296,7 +297,8 @@ EclipseGridParser::EclipseGridParser(const string& filename, bool convert_to_SI)
: current_reading_mode_(Regular), : current_reading_mode_(Regular),
start_date_(boost::date_time::not_a_date_time), start_date_(boost::date_time::not_a_date_time),
current_time_days_(0.0), current_time_days_(0.0),
current_epoch_(0) current_epoch_(0),
special_field_by_epoch_(1)
{ {
// Store directory of filename // Store directory of filename
boost::filesystem::path p(filename); boost::filesystem::path p(filename);
@@ -319,6 +321,8 @@ void EclipseGridParser::read(istream& is, bool convert_to_SI)
floating_field_map_.clear(); floating_field_map_.clear();
special_field_by_epoch_.clear(); special_field_by_epoch_.clear();
special_field_by_epoch_.push_back(SpecialMap()); special_field_by_epoch_.push_back(SpecialMap());
current_time_days_ = 0.0;
current_epoch_ = 0;
readImpl(is); readImpl(is);