From 732cd332397c9e08c9bacb446064beb17491ccd7 Mon Sep 17 00:00:00 2001 From: Tomer Barletz Date: Mon, 11 Jul 2016 15:38:49 -0700 Subject: [PATCH] Fix return types from boolean/false to pointer/NULL. --- crnlib/crn_image_utils.cpp | 2 +- crnlib/crnlib.cpp | 6 +++--- inc/crn_decomp.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crnlib/crn_image_utils.cpp b/crnlib/crn_image_utils.cpp index 409e675..0ffac1f 100644 --- a/crnlib/crn_image_utils.cpp +++ b/crnlib/crn_image_utils.cpp @@ -1305,7 +1305,7 @@ namespace crnlib *pActualComps = 0; if ((req_comps < 1) || (req_comps > 4)) - return false; + return NULL; mipmapped_texture tex; diff --git a/crnlib/crnlib.cpp b/crnlib/crnlib.cpp index ac485d0..682efad 100644 --- a/crnlib/crnlib.cpp +++ b/crnlib/crnlib.cpp @@ -172,7 +172,7 @@ void *crn_compress(const crn_comp_params &comp_params, crn_uint32 &compressed_si if (pActual_bitrate) *pActual_bitrate = 0.0f; if (!comp_params.check()) - return false; + return NULL; crnlib::vector crn_file_data; if (!create_compressed_texture(comp_params, crn_file_data, pActual_quality_level, pActual_bitrate)) @@ -189,7 +189,7 @@ void *crn_compress(const crn_comp_params &comp_params, const crn_mipmap_params & if (pActual_bitrate) *pActual_bitrate = 0.0f; if ((!comp_params.check()) || (!mip_params.check())) - return false; + return NULL; crnlib::vector crn_file_data; if (!create_compressed_texture(comp_params, mip_params, crn_file_data, pActual_quality_level, pActual_bitrate)) @@ -456,4 +456,4 @@ bool crn_decompress_block(const void *pSrc_block, crn_uint32 *pDst_pixels_u32, c } return true; -} \ No newline at end of file +} diff --git a/inc/crn_decomp.h b/inc/crn_decomp.h index 50b63db..680beb1 100644 --- a/inc/crn_decomp.h +++ b/inc/crn_decomp.h @@ -2823,15 +2823,15 @@ namespace crnd *pSize = 0; if ((!pData) || (data_size < cCRNHeaderMinSize)) - return false; + return NULL; crn_header tmp_header; const crn_header* pHeader = crnd_get_header(tmp_header, pData, data_size); if (!pHeader) - return false; + return NULL; if (level_index >= pHeader->m_levels) - return false; + return NULL; uint32 cur_level_ofs = pHeader->m_level_ofs[level_index];