Browse Source

indentation

opengl-renderer-broken
Martin Dørum 4 years ago
parent
commit
8b11f2f06d
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      libswan/src/Chunk.cc

+ 5
- 5
libswan/src/Chunk.cc View File



uLongf destlen = sizeof(dest); uLongf destlen = sizeof(dest);
int ret = compress2( int ret = compress2(
(Bytef *)dest, &destlen,
(Bytef *)data_.get(), CHUNK_WIDTH * CHUNK_HEIGHT * sizeof(Tile::ID),
Z_BEST_COMPRESSION);
(Bytef *)dest, &destlen,
(Bytef *)data_.get(), CHUNK_WIDTH * CHUNK_HEIGHT * sizeof(Tile::ID),
Z_BEST_COMPRESSION);


if (ret == Z_OK) { if (ret == Z_OK) {
data_.reset(new uint8_t[destlen]); data_.reset(new uint8_t[destlen]);
auto dest = std::make_unique<uint8_t[]>(CHUNK_WIDTH * CHUNK_HEIGHT * sizeof(Tile::ID)); auto dest = std::make_unique<uint8_t[]>(CHUNK_WIDTH * CHUNK_HEIGHT * sizeof(Tile::ID));
uLongf destlen = CHUNK_WIDTH * CHUNK_HEIGHT * sizeof(Tile::ID); uLongf destlen = CHUNK_WIDTH * CHUNK_HEIGHT * sizeof(Tile::ID);
int ret = uncompress( int ret = uncompress(
dest.get(), &destlen,
(Bytef *)data_.get(), compressed_size_);
dest.get(), &destlen,
(Bytef *)data_.get(), compressed_size_);


if (ret != Z_OK) { if (ret != Z_OK) {
panic << "Decompressing chunk failed: " << ret; panic << "Decompressing chunk failed: " << ret;

Loading…
Cancel
Save