Changeset 12318


Ignore:
Timestamp:
2006-07-28T12:00:42+12:00 (18 years ago)
Author:
kjdon
Message:

some changes submitted by Emanuel Dejanu

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/indexers/mgpp/text/GSDLQueryLex.cpp

    r8692 r12318  
    4343  // this version of end is used in unitool
    4444  //  UCArray::const_iterator endMinus1 = end-1;
    45   const unsigned char* endMinus1 = &(*end)-1;
     45  const unsigned char* endMinus1 = &*(end - 1);
    4646
    4747  int charLen;
     
    8383  // this version of end is used in unitool
    8484  //UCArray::const_iterator endMinus1 = end-1;
    85   const unsigned char* endMinus1 = &(*end)-1;
     85  const unsigned char* endMinus1 = &*(end - 1);
    8686
    8787  int charLen=0;
     
    123123               UCArray::const_iterator end,
    124124               UCArray &text) {
     125  if (here == end)
     126    return false;
     127
    125128  //UCArray::const_iterator endMinus1 = end-1;
    126   const unsigned char* endMinus1 = &(*end)-1;
     129  const unsigned char* endMinus1 = &*(end - 1);
    127130  const unsigned char* new_here = ParseIndexWord (&*here, endMinus1, text);
    128131  here += (new_here - &*here); // advance iterator by number of chars advanced
     
    137140
    138141  // strange things can happen if here == end == 0
    139   if (here == end) return false;
     142  if (here == end)
     143    return false;
    140144 
    141145  // this version of end is used in unitool
    142146  //UCArray::const_iterator endMinus1 = end-1;
    143   const unsigned char* endMinus1 = &(*end)-1;
     147  const unsigned char* endMinus1 = &*(end - 1);
    144148
    145149  // ignore all white space
  • trunk/mgpp/text/GSDLQueryLex.cpp

    r8692 r12318  
    4343  // this version of end is used in unitool
    4444  //  UCArray::const_iterator endMinus1 = end-1;
    45   const unsigned char* endMinus1 = &(*end)-1;
     45  const unsigned char* endMinus1 = &*(end - 1);
    4646
    4747  int charLen;
     
    8383  // this version of end is used in unitool
    8484  //UCArray::const_iterator endMinus1 = end-1;
    85   const unsigned char* endMinus1 = &(*end)-1;
     85  const unsigned char* endMinus1 = &*(end - 1);
    8686
    8787  int charLen=0;
     
    123123               UCArray::const_iterator end,
    124124               UCArray &text) {
     125  if (here == end)
     126    return false;
     127
    125128  //UCArray::const_iterator endMinus1 = end-1;
    126   const unsigned char* endMinus1 = &(*end)-1;
     129  const unsigned char* endMinus1 = &*(end - 1);
    127130  const unsigned char* new_here = ParseIndexWord (&*here, endMinus1, text);
    128131  here += (new_here - &*here); // advance iterator by number of chars advanced
     
    137140
    138141  // strange things can happen if here == end == 0
    139   if (here == end) return false;
     142  if (here == end)
     143    return false;
    140144 
    141145  // this version of end is used in unitool
    142146  //UCArray::const_iterator endMinus1 = end-1;
    143   const unsigned char* endMinus1 = &(*end)-1;
     147  const unsigned char* endMinus1 = &*(end - 1);
    144148
    145149  // ignore all white space
Note: See TracChangeset for help on using the changeset viewer.