From 177304bb7c19a4fa6910d62ecd4cc2e3b369954f Mon Sep 17 00:00:00 2001 From: ihsinme <61293369+ihsinme@users.noreply.github.com> Date: Wed, 6 Jan 2021 16:50:07 +0300 Subject: [PATCH] Update o3dgcArithmeticCodec.cpp --- contrib/Open3DGC/o3dgcArithmeticCodec.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/Open3DGC/o3dgcArithmeticCodec.cpp b/contrib/Open3DGC/o3dgcArithmeticCodec.cpp index 3597ec39a..2ae70fa2e 100644 --- a/contrib/Open3DGC/o3dgcArithmeticCodec.cpp +++ b/contrib/Open3DGC/o3dgcArithmeticCodec.cpp @@ -522,8 +522,7 @@ namespace o3dgc buffer_size = max_code_bytes; // assign new memory delete [] new_buffer; // free anything previously assigned - if ((new_buffer = new unsigned char[buffer_size+16]) == 0) // 16 extra bytes - AC_Error("cannot assign memory for compressed data buffer"); + new_buffer = new unsigned char[buffer_size+16]; // 16 extra bytes code_buffer = new_buffer; // set buffer for compressed data } @@ -732,7 +731,6 @@ namespace o3dgc table_size = table_shift = 0; distribution = new unsigned[data_symbols]; } - if (distribution == 0) AC_Error("cannot assign model memory"); } // compute cumulative distribution, decoder table unsigned s = 0; @@ -803,7 +801,6 @@ namespace o3dgc distribution = new unsigned[2*data_symbols]; } symbol_count = distribution + data_symbols; - if (distribution == 0) AC_Error("cannot assign model memory"); } reset(); // initialize model