[Groonga-commit] groonga/grnxx at 598d04b [master] Fix a bug that incremenal sorting is not used. (#42)

Back to archive index

susumu.yata null+****@clear*****
Fri Dec 12 13:15:52 JST 2014


susumu.yata	2014-12-12 13:15:52 +0900 (Fri, 12 Dec 2014)

  New Revision: 598d04b4a921ae99832e1a75613fbc8207f20e1a
  https://github.com/groonga/grnxx/commit/598d04b4a921ae99832e1a75613fbc8207f20e1a

  Message:
    Fix a bug that incremenal sorting is not used. (#42)

  Modified files:
    lib/grnxx/impl/sorter.cpp

  Modified: lib/grnxx/impl/sorter.cpp (+1 -2)
===================================================================
--- lib/grnxx/impl/sorter.cpp    2014-12-12 13:08:27 +0900 (5081944)
+++ lib/grnxx/impl/sorter.cpp    2014-12-12 13:15:52 +0900 (8389bb9)
@@ -1208,9 +1208,8 @@ Sorter::Sorter(Array<SorterOrder> &&orders, const SorterOptions &options)
     limit_ = std::numeric_limits<size_t>::max() - offset_;
   }
 
-  nodes_.resize(orders.size());
   for (size_t i = 0; i < orders.size(); ++i) {
-    nodes_[i].reset(create_node(std::move(orders[i])));
+    nodes_.push_back(std::unique_ptr<Node>(create_node(std::move(orders[i]))));
   }
   for (size_t i = 1; i < orders.size(); ++i) {
     nodes_[i - 1]->set_next(nodes_[i].get());
-------------- next part --------------
HTML����������������������������...
Download 



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