[Groonga-commit] groonga/grnxx at f6b3fc4 [master] Use a temporary variable row_id instead of row_ids[i].

Back to archive index

susumu.yata null+****@clear*****
Tue Mar 4 10:34:46 JST 2014


susumu.yata	2014-03-04 10:34:46 +0900 (Tue, 04 Mar 2014)

  New Revision: f6b3fc484c40b67317b68781757cbda77797ccaf
  https://github.com/groonga/grnxx/commit/f6b3fc484c40b67317b68781757cbda77797ccaf

  Message:
    Use a temporary variable row_id instead of row_ids[i].

  Modified files:
    lib/grnxx/calc_impl.cpp

  Modified: lib/grnxx/calc_impl.cpp (+3 -2)
===================================================================
--- lib/grnxx/calc_impl.cpp    2014-03-04 10:32:40 +0900 (89efa31)
+++ lib/grnxx/calc_impl.cpp    2014-03-04 10:34:46 +0900 (5bde6ed)
@@ -247,7 +247,7 @@ Int64 ComparerNode<T, U, V>::filter(RowID *row_ids, Int64 num_row_ids) {
   Int64 count = 0;
   for (Int64 i = 0; i < num_row_ids; ++i) {
     RowID row_id = row_ids[i];
-    if (comparer_(lhs_->get(i, row_ids[i]), rhs_->get(i, row_ids[i]))) {
+    if (comparer_(lhs_->get(i, row_id), rhs_->get(i, row_id))) {
       row_ids[count++] = row_id;
     }
   }
@@ -261,7 +261,8 @@ void ComparerNode<T, U, V>::fill(const RowID *row_ids, Int64 num_row_ids) {
   rhs_->fill(row_ids, num_row_ids);
   data_.resize(num_row_ids);
   for (Int64 i = 0; i < num_row_ids; ++i) {
-    data_[i] = comparer_(lhs_->get(i, row_ids[i]), rhs_->get(i, row_ids[i]));
+    RowID row_id = row_ids[i];
+    data_[i] = comparer_(lhs_->get(i, row_id), rhs_->get(i, row_id));
   }
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index