Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-295 Address integer conversion compiler warnings
  3. LUCY-301

Change Read_C32/etc to explicitly signed Read_CI32/CU32/etc

    XMLWordPrintableJSON

Details

    Description

      At present, InStream, OutStream, and NumberUtils provide an unsigned compressed format called C32/C64 – and when we need signed representations, we just cast.

      To get rid of all these casts (and fix some sites missing casts), support signed and unsigned variants:

      • Write_CI32
      • Read_CI32
      • Write_CU32
      • Read_CU32
      • Write_CI64
      • Read_CI64
      • Write_CU64
      • Read_CU64

      Note that the encoding is not well suited for negative numbers, as they always require the maximum of 5 or 10 bytes. However, this change is worthwhile simply for the sake of keeping the signs straight in the code without casting all the time.

      Attachments

        Activity

          People

            marvin Marvin Humphrey
            marvin Marvin Humphrey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: