Removing an unnecessary const cast.

This commit is contained in:
Robin Sommer 2012-04-18 14:59:42 -07:00
parent a7bc12066b
commit 1fba55f4f3
2 changed files with 2 additions and 4 deletions

View file

@ -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<ExtentType *>(log_types.registerType(schema));
log_type = log_types.registerType(schema);
log_series.setType(*log_type);
return OpenLog(path);

View file

@ -99,7 +99,7 @@ private:
// Internal DataSeries structures we need to keep track of.
vector<SchemaValue> schema_list;
ExtentTypeLibrary log_types;
ExtentType *log_type;
const ExtentType *log_type;
ExtentSeries log_series;
ExtentMap extents;
int compress_type;