diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-17 22:12:00 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-17 22:12:00 +0200 |
commit | 21df26984da91143c15587f5a03c98d68c3adc4e (patch) | |
tree | aaa707a628ad331f67890023dffe1b4f60dd01d3 /src/util/png.cpp | |
parent | b09fc5de5cdb021f43ad32b7e3f50dc75c0bc622 (diff) | |
parent | eabf05758e3ba5f6f4bb1b8d1d1f02179b84e410 (diff) | |
download | dragonfireclient-21df26984da91143c15587f5a03c98d68c3adc4e.tar.xz |
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/util/png.cpp')
-rwxr-xr-x | src/util/png.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/png.cpp b/src/util/png.cpp index 7ac2e94a1..698cbc9a5 100755 --- a/src/util/png.cpp +++ b/src/util/png.cpp @@ -37,11 +37,11 @@ static void writeChunk(std::ostringstream &target, const std::string &chunk_str) std::string encodePNG(const u8 *data, u32 width, u32 height, s32 compression) { - auto file = std::ostringstream(std::ios::binary); + std::ostringstream file(std::ios::binary); file << "\x89PNG\r\n\x1a\n"; { - auto IHDR = std::ostringstream(std::ios::binary); + std::ostringstream IHDR(std::ios::binary); IHDR << "IHDR"; writeU32(IHDR, width); writeU32(IHDR, height); @@ -51,9 +51,9 @@ std::string encodePNG(const u8 *data, u32 width, u32 height, s32 compression) } { - auto IDAT = std::ostringstream(std::ios::binary); + std::ostringstream IDAT(std::ios::binary); IDAT << "IDAT"; - auto scanlines = std::ostringstream(std::ios::binary); + std::ostringstream scanlines(std::ios::binary); for(u32 i = 0; i < height; i++) { scanlines.write("\x00", 1); // Null predictor scanlines.write((const char*) data + width * 4 * i, width * 4); |