From 7dcc10a254e780ca7c8e6047f0cc03b7717a148a Mon Sep 17 00:00:00 2001 From: aletempiac Date: Wed, 10 Jan 2024 15:18:39 +0100 Subject: [PATCH] Minor fixes --- src/acd/ac_decomposition.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/acd/ac_decomposition.hpp b/src/acd/ac_decomposition.hpp index 2b3161476..64155b713 100644 --- a/src/acd/ac_decomposition.hpp +++ b/src/acd/ac_decomposition.hpp @@ -174,7 +174,7 @@ public: return; generate_decomposition(); - return get_decomposition_abc( decompArray ); + get_decomposition_abc( decompArray ); } private: @@ -264,9 +264,12 @@ private: return false; /* estimation on number of LUTs */ - pst->num_luts = best_multiplicity <= 2 ? 2 : best_multiplicity <= 4 ? 3 - : best_multiplicity <= 8 ? 4 - : 5; + if ( pst ) + { + pst->num_luts = best_multiplicity <= 2 ? 2 : best_multiplicity <= 4 ? 3 + : best_multiplicity <= 8 ? 4 + : 5; + } return true; } @@ -799,7 +802,7 @@ private: best_iset_offset.push_back( offset ); } - if ( pst != nullptr ) + if ( pst ) { pst->num_luts = num_luts; pst->num_levels = num_levels; @@ -868,7 +871,7 @@ private: best_iset_offset.push_back( offset ); } - if ( pst != nullptr ) + if ( pst ) { pst->num_luts = num_luts; pst->num_levels = num_levels;