Address PR comments
This commit is contained in:
parent
bf690df97a
commit
0c04c6cafb
@ -859,18 +859,15 @@ class ContiguousInternalMemoryDataFacade : public BaseDataFacade
|
|||||||
const unsigned end = m_geometry_indices.at(id + 1);
|
const unsigned end = m_geometry_indices.at(id + 1);
|
||||||
|
|
||||||
std::vector<DatasourceID> result_datasources;
|
std::vector<DatasourceID> result_datasources;
|
||||||
result_datasources.resize(end - begin);
|
|
||||||
|
|
||||||
// If there was no datasource info, return an array of 0's.
|
// If there was no datasource info, return an array of 0's.
|
||||||
if (m_datasource_list.empty())
|
if (m_datasource_list.empty())
|
||||||
{
|
{
|
||||||
for (unsigned i = 0; i < end - begin; ++i)
|
result_datasources.resize(end - begin, 0);
|
||||||
{
|
|
||||||
result_datasources.push_back(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
result_datasources.resize(end - begin);
|
||||||
std::copy(m_datasource_list.begin() + begin,
|
std::copy(m_datasource_list.begin() + begin,
|
||||||
m_datasource_list.begin() + end,
|
m_datasource_list.begin() + end,
|
||||||
result_datasources.begin());
|
result_datasources.begin());
|
||||||
@ -902,13 +899,11 @@ class ContiguousInternalMemoryDataFacade : public BaseDataFacade
|
|||||||
// If there was no datasource info, return an array of 0's.
|
// If there was no datasource info, return an array of 0's.
|
||||||
if (m_datasource_list.empty())
|
if (m_datasource_list.empty())
|
||||||
{
|
{
|
||||||
for (unsigned i = 0; i < end - begin; ++i)
|
result_datasources.resize(end - begin, 0);
|
||||||
{
|
|
||||||
result_datasources.push_back(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
result_datasources.resize(end - begin);
|
||||||
std::copy(m_datasource_list.rbegin() + (m_datasource_list.size() - end),
|
std::copy(m_datasource_list.rbegin() + (m_datasource_list.size() - end),
|
||||||
m_datasource_list.rbegin() + (m_datasource_list.size() - begin),
|
m_datasource_list.rbegin() + (m_datasource_list.size() - begin),
|
||||||
result_datasources.begin());
|
result_datasources.begin());
|
||||||
|
@ -91,7 +91,7 @@ class FileReader
|
|||||||
const auto &result = input_stream.read(reinterpret_cast<char *>(dest), count * sizeof(T));
|
const auto &result = input_stream.read(reinterpret_cast<char *>(dest), count * sizeof(T));
|
||||||
const std::size_t bytes_read = input_stream.gcount();
|
const std::size_t bytes_read = input_stream.gcount();
|
||||||
|
|
||||||
if (bytes_read != count && !result)
|
if (bytes_read != count * sizeof(T) && !result)
|
||||||
{
|
{
|
||||||
if (result.eof())
|
if (result.eof())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user