← Back to team overview

cuneiform team mailing list archive

Weird code [Kern\rpic\sources\dll.cpp(207)]

 

Hi all,


In the code at "Kern\rpic\sources\dll.cpp" there is this:

Word32 GetReturnCode_rpic()
{
Word32 rc = gwLowRC;
Word16 low = (Word16)(gwLowRC &  0xFFFF);
Word16 hei = (Word16)(gwLowRC >> 16);

    if(hei == gwHeightRC || hei == 0)
        rc = low + IDS_ERR_NO;

return rc;
}

However, gwLowRC is defined as a Word16... Shifting it will ALWAYS result in
"0".
Would it be ok to simplify this function to:
Word32 GetReturnCode_rpic()
{
   return gwLowRC + IDS_ERR_NO;
}



Thanks,
Steven

Follow ups