Changeset 5031:4f382c0a5006 in orange


Ignore:
Timestamp:
07/30/08 14:58:09 (6 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
85c41db023b4b2c6bef015ef274255b91b693171
Message:
  • fixed problems with ambiguous crc functions
Location:
source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/include/crc.h

    r3408 r5031  
    55 
    66#define ADD_CRC \ 
    7   for(unsigned char *b = (unsigned char *)(&data), *e = b + sizeof(data); \ 
     7  for(unsigned char const *b = (unsigned char const *)(&data), *e = b + sizeof(data); \ 
    88      b != e; \ 
    99      crc = (crc >> 8) ^ crc_table[(crc & 0xFF) ^ *(b++)]); \ 
    1010 
    11 inline void add_CRC(unsigned long &data, unsigned long &crc)  
     11inline void add_CRC(const unsigned long data, unsigned long &crc)  
    1212{ ADD_CRC } 
    1313 
    14 inline void add_CRC(float &data, unsigned long &crc)  
     14inline void add_CRC(const float data, unsigned long &crc)  
    1515{ ADD_CRC } 
    1616 
    17 inline void add_CRC(unsigned char c, unsigned long &crc) 
     17inline void add_CRC(const unsigned char c, unsigned long &crc) 
    1818{ crc = (crc >> 8) ^ crc_table[(crc & 0xFF) ^ c]; } 
    1919 
  • source/orange/domain.cpp

    r4928 r5031  
    584584  const_PITERATE(TVarList, vi, variables) { 
    585585    add_CRC((*vi)->name.c_str(), crc); 
    586     add_CRC((*vi)->varType, crc); 
     586    add_CRC((const unsigned char)(*vi)->varType, crc); 
    587587    if ((*vi)->varType == TValue::INTVAR) 
    588588      PITERATE(TStringList, vli, dynamic_cast<TEnumVariable &>(vi->getReference()).values) 
Note: See TracChangeset for help on using the changeset viewer.