Remove unused code.

This commit is contained in:
Daniel Patterson 2016-11-14 15:27:09 -08:00
parent 2f9b5788d0
commit 2dfeb0cabc
2 changed files with 2 additions and 30 deletions

View File

@ -143,15 +143,6 @@ class FileReader
// To make function calls consistent, this function returns the fixed number of properties // To make function calls consistent, this function returns the fixed number of properties
inline std::size_t readPropertiesCount() { return 1; } inline std::size_t readPropertiesCount() { return 1; }
// Returns the number of bytes in a file
inline std::size_t readNumberOfBytes(boost::filesystem::ifstream &input_stream)
{
input_stream.seekg(0, input_stream.end);
auto length = input_stream.tellg();
input_stream.seekg(0, input_stream.beg);
return length;
}
#pragma pack(push, 1) #pragma pack(push, 1)
struct HSGRHeader struct HSGRHeader
{ {
@ -201,25 +192,6 @@ inline void readHSGR(io::FileReader &input_file,
input_file.ReadInto(edge_buffer, number_of_edges); input_file.ReadInto(edge_buffer, number_of_edges);
} }
// Loads properties from a `.properties` file into memory
inline void readProperties(io::FileReader &properties_file,
extractor::ProfileProperties *properties,
const std::size_t properties_size)
{
BOOST_ASSERT(properties);
properties_file.ReadInto(properties, properties_size);
}
// Reads the timestamp in a `.timestamp` file
// Use readNumberOfBytes() beforehand to get the length of the file
inline void readTimestamp(boost::filesystem::ifstream &timestamp_input_stream,
char *timestamp,
const std::size_t timestamp_length)
{
BOOST_ASSERT(timestamp);
timestamp_input_stream.read(timestamp, timestamp_length * sizeof(char));
}
// Loads datasource_indexes from .datasource_indexes into memory // Loads datasource_indexes from .datasource_indexes into memory
// Needs to be called after readElementCount() to get the correct offset in the stream // Needs to be called after readElementCount() to get the correct offset in the stream
inline void readDatasourceIndexes(io::FileReader &datasource_indexes_file, inline void readDatasourceIndexes(io::FileReader &datasource_indexes_file,

View File

@ -780,8 +780,8 @@ void Storage::LoadData(DataLayout *layout_ptr, char *memory_ptr)
const auto profile_properties_ptr = const auto profile_properties_ptr =
layout_ptr->GetBlockPtr<extractor::ProfileProperties, true>(memory_ptr, layout_ptr->GetBlockPtr<extractor::ProfileProperties, true>(memory_ptr,
DataLayout::PROPERTIES); DataLayout::PROPERTIES);
const auto properties_size = io::readPropertiesCount(); profile_properties_file.ReadInto(profile_properties_ptr,
io::readProperties(profile_properties_file, profile_properties_ptr, properties_size); layout_ptr->num_entries[DataLayout::PROPERTIES]);
} }
// Load intersection data // Load intersection data