db/version_set.cc
// Stores the minimal range that covers all entries in inputs in
// *smallest, *largest.
// REQUIRES: inputs is not empty
Stores the minimal range that covers all entries in inputs in
smallest, *largest.
REQUIRES: inputs is not empty
Stores the minimal range that covers all entries in inputs in smallest * largest . REQUIRES : inputs is not empty
void VersionSet::GetRange(const std::vector<SetMetaData*>& inputs,
                          InternalKey* smallest, InternalKey* largest) {
  assert(!inputs.empty());
  smallest->Clear();
  largest->Clear();
  for (size_t i = 0; i < inputs.size(); i++) {
    SetMetaData* f = inputs[i];
    if (i == 0) {
      *smallest = f->smallest;
      *largest = f->largest;
    } else {
      if (icmp_.Compare(f->smallest, *smallest) < 0) {
        *smallest = f->smallest;
      }
      if (icmp_.Compare(f->largest, *largest) > 0) {
        *largest = f->largest;
      }
    }
  }
}
void VersionSet :: GetRange ( const std :: vector < SetMetaData * > & inputs , InternalKey * smallest , InternalKey * largest ) { assert ( ! inputs . empty ( ) ) ; smallest -> Clear ( ) ; largest -> Clear ( ) ; for ( size_t i = 0 ; i < inputs . size ( ) ; i ++ ) { SetMetaData * f = inputs [ i ] ; if ( i == 0 ) { * smallest = f -> smallest ; * largest = f -> largest ; } else { if ( icmp_ . Compare ( f -> smallest , * smallest ) < 0 ) { * smallest = f -> smallest ; } if ( icmp_ . Compare ( f -> largest , * largest ) > 0 ) { * largest = f -> largest ; } } } }
Stores the minimal range that covers all entries in inputs in
smallest, *largest.
Stores the minimal range that covers all entries in inputs in smallest * largest .