Skip to content

Commit

Permalink
Merge pull request BinomialLLC#3 from DaemonEngine/slipher/unity-warn…
Browse files Browse the repository at this point in the history
…ings

Fix warnings introduced by Unity changes
  • Loading branch information
slipher authored Apr 8, 2018
2 parents c275f97 + 9f1e641 commit f6e48df
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions inc/crn_decomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@ static void* crnd_default_realloc(void* p, size_t size, size_t* pActual_size, bo
}

static size_t crnd_default_msize(void* p, void* pUser_data) {
pUser_data;
(void)pUser_data;
#ifdef WIN32
return p ? _msize(p) : 0;
#else
Expand Down Expand Up @@ -2323,11 +2323,11 @@ const void* crnd_get_level_data(const void* pData, uint32 data_size, uint32 leve

uint32 crnd_get_segmented_file_size(const void* pData, uint32 data_size) {
if ((!pData) || (data_size < cCRNHeaderMinSize))
return NULL;
return false;

const crn_header* pHeader = crnd_get_header(pData, data_size);
if (!pHeader)
return NULL;
return false;

uint32 size = pHeader->m_header_size;

Expand Down Expand Up @@ -3297,8 +3297,8 @@ class crn_unpacker {

bool unpack_dxt1(uint8** pDst, uint32 output_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_color_endpoints = m_color_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (output_pitch_in_bytes >> 2) - (width << 1);

if (m_block_buffer.size() < width)
Expand Down Expand Up @@ -3349,8 +3349,8 @@ class crn_unpacker {
bool unpack_dxt5(uint8** pDst, uint32 row_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_color_endpoints = m_color_endpoints.size();
const uint32 num_alpha_endpoints = m_alpha_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (row_pitch_in_bytes >> 2) - (width << 2);

if (m_block_buffer.size() < width)
Expand Down Expand Up @@ -3411,8 +3411,8 @@ class crn_unpacker {

bool unpack_dxn(uint8** pDst, uint32 row_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_alpha_endpoints = m_alpha_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (row_pitch_in_bytes >> 2) - (width << 2);

if (m_block_buffer.size() < width)
Expand Down Expand Up @@ -3474,8 +3474,8 @@ class crn_unpacker {

bool unpack_dxt5a(uint8** pDst, uint32 row_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_alpha_endpoints = m_alpha_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (row_pitch_in_bytes >> 2) - (width << 1);

if (m_block_buffer.size() < width)
Expand Down Expand Up @@ -3526,8 +3526,8 @@ class crn_unpacker {

bool unpack_etc1(uint8** pDst, uint32 output_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_color_endpoints = m_color_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (output_pitch_in_bytes >> 2) - (width << 1);

if (m_block_buffer.size() < width << 1)
Expand Down Expand Up @@ -3593,8 +3593,8 @@ class crn_unpacker {
bool unpack_etc2a(uint8** pDst, uint32 output_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_color_endpoints = m_color_endpoints.size();
const uint32 num_alpha_endpoints = m_alpha_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (output_pitch_in_bytes >> 2) - (width << 2);

if (m_block_buffer.size() < width << 1)
Expand Down

0 comments on commit f6e48df

Please sign in to comment.