Ignore:
Timestamp:
2008-05-22T12:58:14+12:00 (16 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Replaced the "getfirstkey()" and "getnextkey()" functions in dbclass with "getkeys()" (which returns them all). These functions were only used in userdb.cpp, and having the one function is simpler without being (much) less efficient. Also, implementing getkeys() for the new sql db classes will be easier than getfirstkey() and getnextkey().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/lib/gdbmclass.cpp

    r15598 r15630  
    239239
    240240
     241text_tarray gdbmclass::getkeys ()
     242{
     243  text_tarray keys;
     244
     245  text_t key = getfirstkey();
     246  while (!key.empty())
     247  {
     248    keys.push_back(key);
     249    key = getnextkey(key);
     250  }
     251
     252  return keys;
     253}
     254
     255
    241256// getfirstkey and getnextkey are used for traversing the database
    242257// no insertions or deletions should be carried out while traversing
Note: See TracChangeset for help on using the changeset viewer.