[Groonga-commit] groonga/grnxx at dec56b8 [master] Update ColumnNode to use read(). (#60)

Back to archive index

susumu.yata null+****@clear*****
Fri Sep 19 11:17:36 JST 2014


susumu.yata	2014-09-19 11:17:36 +0900 (Fri, 19 Sep 2014)

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

  Message:
    Update ColumnNode to use read(). (#60)

  Modified files:
    lib/grnxx/expression.cpp

  Modified: lib/grnxx/expression.cpp (+3 -9)
===================================================================
--- lib/grnxx/expression.cpp    2014-09-19 11:16:06 +0900 (21c9bc6)
+++ lib/grnxx/expression.cpp    2014-09-19 11:17:36 +0900 (b8a3ab8)
@@ -453,9 +453,7 @@ class ColumnNode : public TypedNode<T> {
   bool evaluate(Error *,
                 ArrayCRef<Record> records,
                 ArrayRef<Value> results) {
-    for (Int i = 0; i < records.size(); ++i) {
-      results[i] = column_->get(records.get_row_id(i));
-    }
+    column_->read(records, results);
     return true;
   }
 
@@ -490,9 +488,7 @@ class ColumnNode<Bool> : public TypedNode<Bool> {
   bool evaluate(Error *,
                 ArrayCRef<Record> records,
                 ArrayRef<Value> results) {
-    for (Int i = 0; i < records.size(); ++i) {
-      results.set(i, column_->get(records.get_row_id(i)));
-    }
+    column_->read(records, results);
     return true;
   }
 
@@ -544,9 +540,7 @@ class ColumnNode<Float> : public TypedNode<Float> {
   bool evaluate(Error *,
                 ArrayCRef<Record> records,
                 ArrayRef<Value> results) {
-    for (Int i = 0; i < records.size(); ++i) {
-      results[i] = column_->get(records.get_row_id(i));
-    }
+    column_->read(records, results);
     return true;
   }
 
-------------- next part --------------
HTML����������������������������...
Download 



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