~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_list.h

Use List::size()

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
{
108
108
protected:
109
109
  list_node *first,**last;
110
 
 
111
110
public:
112
111
  uint32_t elements;
113
112
 
394
393
  {
395
394
    return iterator(*this, &first);
396
395
  }
 
396
 
 
397
  size_t size() const
 
398
  {
 
399
    return elements;
 
400
  }
397
401
};
398
402
 
399
403
 
402
406
public:
403
407
  List_iterator(List<T>& a, list_node** b) : base_list_iterator(a, b) {};
404
408
  List_iterator() {};
405
 
  inline T* operator++(int) { return (T*) base_list_iterator::next(); }
 
409
  inline T *operator++(int) { return (T*) base_list_iterator::next(); }
406
410
  inline T *replace(T *a)   { return (T*) base_list_iterator::replace(a); }
407
411
  inline T *replace(List<T> &a) { return (T*) base_list_iterator::replace(a); }
408
412
  inline T** ref(void)      { return (T**) base_list_iterator::ref(); }