Diff for /parser3/src/classes/table.C between versions 1.269 and 1.271

version 1.269, 2009/11/09 00:31:07 version 1.271, 2010/05/16 22:12:50
Line 685  static void table_row_to_hash(Table::ele Line 685  static void table_row_to_hash(Table::ele
         bool exist=false;          bool exist=false;
         switch(info->value_type) {          switch(info->value_type) {
                 case C_STRING: {                  case C_STRING: {
                         exist=info->hash->put_dont_replace(*key, new VString(*row->get(info->value_fields->get(0))));                          size_t index=info->value_fields->get(0);
                           exist=info->hash->put_dont_replace(*key, (index < row->count()) ? new VString(*row->get(index)) : new VString());
                         break;                          break;
                 }                  }
                 case C_HASH: {                  case C_HASH: {
Line 979  static void _flip(Request& r, MethodPara Line 980  static void _flip(Request& r, MethodPara
         Table& old_table=GET_SELF(r, VTable).table();          Table& old_table=GET_SELF(r, VTable).table();
         Table& new_table=*new Table(0);          Table& new_table=*new Table(0);
         if(size_t old_count=old_table.count())          if(size_t old_count=old_table.count())
                 if(size_t old_cols=old_table[0]->count())                   if(size_t old_cols=old_table.columns()?old_table.columns()->count():old_table[0]->count()) 
                         for(size_t column=0; column<old_cols; column++) {                          for(size_t column=0; column<old_cols; column++) {
                                 Table::element_type new_row(new ArrayString(old_count));                                  Table::element_type new_row(new ArrayString(old_count));
                                 for(size_t i=0; i<old_count; i++) {                                  for(size_t i=0; i<old_count; i++) {

Removed from v.1.269  
changed lines
  Added in v.1.271


E-mail: