Changeset 15651

Show
Ignore:
Timestamp:
22.05.2008 16:00:36 (12 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Tidied up getinfo().

Files:
1 modified

Legend:

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

    r15649 r15651  
    127127{ 
    128128  text_t data; 
    129    
    130   if (!getkeydata (key, data)) return false; 
    131   text_t::iterator here = data.begin (); 
    132   text_t::iterator end = data.end (); 
    133    
     129  if (!getkeydata(key, data)) return false; 
     130 
     131  // Use getinfoline() to parse the data value into the infodbclass object 
     132  text_t::iterator data_iterator = data.begin(); 
    134133  text_t ikey, ivalue; 
    135   info.clear (); // reset info 
    136    
    137   while (getinfoline (here, end, ikey, ivalue)) { 
    138     info.addinfo (ikey, ivalue); 
    139   } 
    140    
     134  info.clear(); 
     135  while (getinfoline(data_iterator, data.end(), ikey, ivalue)) 
     136  { 
     137    info.addinfo(ikey, ivalue); 
     138  } 
     139 
    141140  return true; 
    142141}