diff --git a/src/logging/writers/DataSeries.cc b/src/logging/writers/DataSeries.cc index f6b26dc494..3c88c65653 100644 --- a/src/logging/writers/DataSeries.cc +++ b/src/logging/writers/DataSeries.cc @@ -212,8 +212,6 @@ std::string DataSeries::GetDSOptionsForType(const threading::Field *field) } } -// ************************ CLASS IMPL ********************************* - DataSeries::DataSeries(WriterFrontend* frontend) : WriterBackend(frontend) { ds_compression = string((const char *)BifConst::LogDataSeries::compression->Bytes(), @@ -329,7 +327,7 @@ bool DataSeries::DoInit(string path, int num_fields, const threading::Field* con else Warning(Fmt("%s is not a valid compression type. Valid types are: 'lzf', 'lzo', 'gz', 'bz2', 'none', 'any'. Defaulting to 'any'", ds_compression.c_str())); - log_type = const_cast(log_types.registerType(schema)); + log_type = log_types.registerType(schema); log_series.setType(*log_type); return OpenLog(path); diff --git a/src/logging/writers/DataSeries.h b/src/logging/writers/DataSeries.h index 5faa87e1b2..bd2eb418f6 100644 --- a/src/logging/writers/DataSeries.h +++ b/src/logging/writers/DataSeries.h @@ -99,7 +99,7 @@ private: // Internal DataSeries structures we need to keep track of. vector schema_list; ExtentTypeLibrary log_types; - ExtentType *log_type; + const ExtentType *log_type; ExtentSeries log_series; ExtentMap extents; int compress_type;