Points: fix several warnings, fix invalid point assignment

This commit is contained in:
wmayer
2021-12-14 11:35:02 +01:00
parent 105836293e
commit 56ebdec1b7

View File

@@ -1490,10 +1490,9 @@ void E57Reader::read(const std::string& filename)
e57::CompressedVectorReader cvr(cvn.reader(sdb));
bool hasColor = (cnt_rgb==3) && useColor;
bool hasState = inv_state && checkState;
float r,g,b;
bool filter = false;
while(count = cvr.read()) {
while((count = cvr.read())) {
for (size_t i=0; i<count; ++i) {
filter = false;
if (hasState) {
@@ -1510,7 +1509,7 @@ void E57Reader::read(const std::string& filename)
if (!filter) {
cnt_pts++;
points.push_back(pt);
last.x, last.y, last.z = pt.x, pt.y, pt.z;
last = pt;
if (hasColor) {
App::Color c;
c.r = static_cast<float>(rgb[ptr_rgb[0]*buf_size+i])/255.0f;