[Groonga-commit] groonga/grnxx at 027beb0 [master] Inline the constructor of CursorOptions.

Back to archive index

susumu.yata null+****@clear*****
Tue Dec 16 10:40:56 JST 2014


susumu.yata	2014-11-06 11:22:52 +0900 (Thu, 06 Nov 2014)

  New Revision: 027beb08941a4286ac5cf11269509d35b5daeebf
  https://github.com/groonga/grnxx/commit/027beb08941a4286ac5cf11269509d35b5daeebf

  Message:
    Inline the constructor of CursorOptions.

  Modified files:
    include/grnxx/cursor.hpp
    lib/grnxx/cursor.cpp

  Modified: include/grnxx/cursor.hpp (+8 -4)
===================================================================
--- include/grnxx/cursor.hpp    2014-11-06 09:25:49 +0900 (30dae7c)
+++ include/grnxx/cursor.hpp    2014-11-06 11:22:52 +0900 (d653715)
@@ -2,6 +2,7 @@
 #define GRNXX_CURSOR_HPP
 
 #include <cstddef>
+#include <limits>
 
 #include "grnxx/array.hpp"
 #include "grnxx/data_types.hpp"
@@ -16,16 +17,19 @@ enum CursorOrderType {
 };
 
 struct CursorOptions {
-  // The first "offset" records are skipped (default: 0).
+  // The first "offset" records are skipped.
   size_t offset;
 
-  // At most "limit" records are read (default: numeric_limits<size_t>::max()).
+  // At most "limit" records are read.
   size_t limit;
 
-  // The order of records (default: REGULAR_ORDER).
+  // The order of records.
   CursorOrderType order_type;
 
-  CursorOptions();
+  CursorOptions()
+      : offset(0),
+        limit(std::numeric_limits<size_t>::max()),
+        order_type(CURSOR_REGULAR_ORDER) {}
 };
 
 class Cursor {

  Modified: lib/grnxx/cursor.cpp (+0 -5)
===================================================================
--- lib/grnxx/cursor.cpp    2014-11-06 09:25:49 +0900 (f52fd12)
+++ lib/grnxx/cursor.cpp    2014-11-06 11:22:52 +0900 (4b48ec1)
@@ -9,11 +9,6 @@ constexpr size_t CURSOR_BLOCK_SIZE = 1024;
 
 }  // namespace
 
-CursorOptions::CursorOptions()
-    : offset(0),
-      limit(std::numeric_limits<size_t>::max()),
-      order_type(CURSOR_REGULAR_ORDER) {}
-
 size_t Cursor::read(size_t max_count, Array<Record> *records) {
   if (max_count == 0) {
     return 0;
-------------- next part --------------
HTML����������������������������...
Descargar 



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