Skip to content

Commit 732cd33

Browse files
committed
Fix return types from boolean/false to pointer/NULL.
1 parent a9653b8 commit 732cd33

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

crnlib/crn_image_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ namespace crnlib
13051305
*pActualComps = 0;
13061306

13071307
if ((req_comps < 1) || (req_comps > 4))
1308-
return false;
1308+
return NULL;
13091309

13101310
mipmapped_texture tex;
13111311

crnlib/crnlib.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void *crn_compress(const crn_comp_params &comp_params, crn_uint32 &compressed_si
172172
if (pActual_bitrate) *pActual_bitrate = 0.0f;
173173

174174
if (!comp_params.check())
175-
return false;
175+
return NULL;
176176

177177
crnlib::vector<uint8> crn_file_data;
178178
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 &
189189
if (pActual_bitrate) *pActual_bitrate = 0.0f;
190190

191191
if ((!comp_params.check()) || (!mip_params.check()))
192-
return false;
192+
return NULL;
193193

194194
crnlib::vector<uint8> crn_file_data;
195195
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
456456
}
457457

458458
return true;
459-
}
459+
}

inc/crn_decomp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2823,15 +2823,15 @@ namespace crnd
28232823
*pSize = 0;
28242824

28252825
if ((!pData) || (data_size < cCRNHeaderMinSize))
2826-
return false;
2826+
return NULL;
28272827

28282828
crn_header tmp_header;
28292829
const crn_header* pHeader = crnd_get_header(tmp_header, pData, data_size);
28302830
if (!pHeader)
2831-
return false;
2831+
return NULL;
28322832

28332833
if (level_index >= pHeader->m_levels)
2834-
return false;
2834+
return NULL;
28352835

28362836
uint32 cur_level_ofs = pHeader->m_level_ofs[level_index];
28372837

0 commit comments

Comments
 (0)