Changeset 19284


Ignore:
Timestamp:
10/24/18 16:01:11 (6 years ago)
Author:
tbretz
Message:
Removed processings from BlockHeader, as a variable size array, it created problem with compiling the root dictionary with certain compilers. Now, the memory position is calculated directly in the code (fortunately, this 'trick' was only used in one location).
Location:
trunk/Mars/mcore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/FITS.h

    r18462 r19284  
    131131        char          ordering;
    132132        unsigned char numProcs;
    133         uint16_t      processings[];
     133        // This looks like a nice solution but always created problems
     134        // with the root dictionary because the dictionary generator
     135        // generates invalid code for some compilers.
     136        // As it is used only while reading, and only in one place
     137        // I replaced that by a direct cast.
     138        // uint16_t      processings[];
    134139
    135140        BlockHeader(uint64_t      s=0,
  • trunk/Mars/mcore/zfits.h

    r17849 r19284  
    518518
    519519            const FITS::BlockHeader* head = reinterpret_cast<FITS::BlockHeader*>(&fCompressedBuffer[compressedOffset]);
     520            const uint16_t *processings = reinterpret_cast<const uint16_t*>(reinterpret_cast<const char*>(head)+sizeof(FITS::BlockHeader));
    520521
    521522            fColumnOrdering[i] = head->ordering;
     
    530531                uint32_t sizeWritten=0;
    531532
    532                 switch (head->processings[j])
     533                switch (processings[j])
    533534                {
    534535                case FITS::kFactRaw:
Note: See TracChangeset for help on using the changeset viewer.