Fix return types from boolean/false to pointer/NULL.

This commit is contained in:
Tomer Barletz
2016-07-11 15:38:49 -07:00
parent a9653b88e7
commit 732cd33239
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -1305,7 +1305,7 @@ namespace crnlib
*pActualComps = 0; *pActualComps = 0;
if ((req_comps < 1) || (req_comps > 4)) if ((req_comps < 1) || (req_comps > 4))
return false; return NULL;
mipmapped_texture tex; mipmapped_texture tex;
+2 -2
View File
@@ -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 (pActual_bitrate) *pActual_bitrate = 0.0f;
if (!comp_params.check()) if (!comp_params.check())
return false; return NULL;
crnlib::vector<uint8> crn_file_data; crnlib::vector<uint8> crn_file_data;
if (!create_compressed_texture(comp_params, crn_file_data, pActual_quality_level, pActual_bitrate)) 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 (pActual_bitrate) *pActual_bitrate = 0.0f;
if ((!comp_params.check()) || (!mip_params.check())) if ((!comp_params.check()) || (!mip_params.check()))
return false; return NULL;
crnlib::vector<uint8> crn_file_data; crnlib::vector<uint8> crn_file_data;
if (!create_compressed_texture(comp_params, mip_params, crn_file_data, pActual_quality_level, pActual_bitrate)) if (!create_compressed_texture(comp_params, mip_params, crn_file_data, pActual_quality_level, pActual_bitrate))
+3 -3
View File
@@ -2823,15 +2823,15 @@ namespace crnd
*pSize = 0; *pSize = 0;
if ((!pData) || (data_size < cCRNHeaderMinSize)) if ((!pData) || (data_size < cCRNHeaderMinSize))
return false; return NULL;
crn_header tmp_header; crn_header tmp_header;
const crn_header* pHeader = crnd_get_header(tmp_header, pData, data_size); const crn_header* pHeader = crnd_get_header(tmp_header, pData, data_size);
if (!pHeader) if (!pHeader)
return false; return NULL;
if (level_index >= pHeader->m_levels) if (level_index >= pHeader->m_levels)
return false; return NULL;
uint32 cur_level_ofs = pHeader->m_level_ofs[level_index]; uint32 cur_level_ofs = pHeader->m_level_ofs[level_index];