Commit f11e3577 authored by Adam Goins's avatar Adam Goins
Browse files

Moved initialization of EndianSwapper to happen outside of the while loop.

parent badfbc7b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1250,6 +1250,7 @@ namespace Isis {
      progress->CheckStatus();
    }

    Isis::EndianSwapper lsb("LSB");
    int pointIndex = -1;
    while (pointInStream.ByteCount() < pointsLength) {
      pointIndex += 1;
@@ -1264,7 +1265,6 @@ namespace Isis {
        uint32_t size;
        pointCodedInStream.ReadRaw(reinterpret_cast<char *>(&size), sizeof(size));
        
        Isis::EndianSwapper lsb("LSB");
        size = lsb.Uint32_t(&size);

        CodedInputStream::Limit oldPointLimit = pointCodedInStream.PushLimit(size);