[glom/glom-1-26] BaseDb_TableData::record_new(): Move a return to the correct scope.



commit 2fb2fc5e749d08a413fcf7535b8d4b1f6f9d67a8
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Dec 3 10:37:11 2014 +0100

    BaseDb_TableData::record_new(): Move a return to the correct scope.
    
    The return true inside the for loop prevented it from actually iterating.
    Found by Coverity Scan.

 glom/base_db_table_data.cc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glom/base_db_table_data.cc b/glom/base_db_table_data.cc
index 75198bb..78bcad6 100644
--- a/glom/base_db_table_data.cc
+++ b/glom/base_db_table_data.cc
@@ -218,11 +218,11 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
 
         //Update related fields, if this field is used in the relationship:
         refresh_related_fields(field_in_record, row, field_value);
+      }
 
-        //TODO: Put the inserted row into result, somehow? murrayc
+      //TODO: Put the inserted row into result, somehow? murrayc
 
-        return true; //success
-      }
+      return true; //success
     }
   }
   else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]