db/version_set.cc
// Finds the largest key in a vector of files. Returns true if files it not
// empty.
Finds the largest key in a vector of files. Returns true if files it not
empty.
Finds the largest key in a vector of files . Returns true if files it not empty .
bool FindLargestKey(const InternalKeyComparator& icmp,
                    const std::vector<FileMetaData*>& files,
                    InternalKey* largest_key) {
  if (files.empty()) {
    return false;
  }
  *largest_key = files[0]->largest;
  for (size_t i = 1; i < files.size(); ++i) {
    FileMetaData* f = files[i];
    if (icmp.Compare(f->largest, *largest_key) > 0) {
      *largest_key = f->largest;
    }
  }
  return true;
}
bool FindLargestKey ( const InternalKeyComparator & icmp , const std :: vector < FileMetaData * > & files , InternalKey * largest_key ) { if ( files . empty ( ) ) { return false ; } * largest_key = files [ 0 ] -> largest ; for ( size_t i = 1 ; i < files . size ( ) ; ++ i ) { FileMetaData * f = files [ i ] ; if ( icmp . Compare ( f -> largest , * largest_key ) > 0 ) { * largest_key = f -> largest ; } } return true ; }
Finds the largest key in a vector of files.
Finds the largest key in a vector of files .