mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-27 16:26:25 -06:00
mark variables const
This commit is contained in:
parent
a825a060c3
commit
24fda63778
@ -152,10 +152,10 @@ std::tuple<T,int,int> PackUnpack(T& in)
|
|||||||
|
|
||||||
Opm::EclMpiSerializer ser(comm);
|
Opm::EclMpiSerializer ser(comm);
|
||||||
ser.pack(in);
|
ser.pack(in);
|
||||||
size_t pos1 = ser.position();
|
const size_t pos1 = ser.position();
|
||||||
T out;
|
T out;
|
||||||
ser.unpack(out);
|
ser.unpack(out);
|
||||||
size_t pos2 = ser.position();
|
const size_t pos2 = ser.position();
|
||||||
|
|
||||||
return std::make_tuple(out, pos1, pos2);
|
return std::make_tuple(out, pos1, pos2);
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,10 @@ std::tuple<T,int,int> PackUnpack(T& in)
|
|||||||
Opm::Serialization::MemPacker packer;
|
Opm::Serialization::MemPacker packer;
|
||||||
Opm::Serializer ser(packer);
|
Opm::Serializer ser(packer);
|
||||||
ser.pack(in);
|
ser.pack(in);
|
||||||
size_t pos1 = ser.position();
|
const size_t pos1 = ser.position();
|
||||||
T out{};
|
T out{};
|
||||||
ser.unpack(out);
|
ser.unpack(out);
|
||||||
size_t pos2 = ser.position();
|
const size_t pos2 = ser.position();
|
||||||
|
|
||||||
return std::make_tuple(std::move(out), pos1, pos2);
|
return std::make_tuple(std::move(out), pos1, pos2);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user