Minor change: Add const to some pointers in write_layer()

This commit is contained in:
David Capello 2022-07-07 16:10:51 -03:00
parent 8fe88606c6
commit daa7cc837a

View File

@ -57,7 +57,7 @@ void write_layer(std::ostream& os, const Layer* layer)
int images = 0;
int celdatas = 0;
for (it=begin; it != end; ++it) {
Cel* cel = *it;
const Cel* cel = *it;
if (!cel->link()) {
++images;
++celdatas;
@ -66,14 +66,14 @@ void write_layer(std::ostream& os, const Layer* layer)
write16(os, images);
for (it=begin; it != end; ++it) {
Cel* cel = *it;
const Cel* cel = *it;
if (!cel->link())
write_image(os, cel->image());
}
write16(os, celdatas);
for (it=begin; it != end; ++it) {
Cel* cel = *it;
const Cel* cel = *it;
if (!cel->link())
write_celdata(os, cel->dataRef().get());
}