~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_list.h

  • Committer: Olaf van der Spek
  • Date: 2011-02-23 15:52:28 UTC
  • mto: (2198.2.3 drizzle-staging)
  • mto: This revision was merged to the branch mainline in revision 2199.
  • Revision ID: olafvdspek@gmail.com-20110223155228-9d8k16dqdnxmc1sl
Use List::front()

Show diffs side-by-side

added added

removed removed

Lines of Context:
229
229
  }
230
230
  inline list_node* last_node() { return *last; }
231
231
  inline list_node* first_node() { return first;}
232
 
  inline void *head() { return first->info; }
233
232
  inline void **head_ref() { return first != &end_of_list ? &first->info : 0; }
234
233
  inline bool is_empty() { return first == &end_of_list ; }
235
234
  inline list_node *last_ref() { return &end_of_list; }
378
377
  inline bool push_back(T *a, memory::Root *mem_root)
379
378
  { return base_list::push_back(a, mem_root); }
380
379
  inline bool push_front(T *a) { return base_list::push_front(a); }
381
 
  inline T* head() {return static_cast<T*>(base_list::head()); }
 
380
  inline T& front() {return *static_cast<T*>(first->info); }
 
381
  inline T* head() {return &front(); }
382
382
  inline T* pop()  {return static_cast<T*>(base_list::pop()); }
383
383
  inline void concat(List<T> *list) { base_list::concat(list); }
384
384
  inline void disjoin(List<T> *list) { base_list::disjoin(list); }