[Groonga-commit] groonga/grnxx [master] Change branch conditions.

Back to archive index

susumu.yata null+****@clear*****
Fri Mar 22 11:06:47 JST 2013


susumu.yata	2013-03-22 11:06:47 +0900 (Fri, 22 Mar 2013)

  New Revision: 37351ef35db0d214d7a143008bfc55891335cd29
  https://github.com/groonga/grnxx/commit/37351ef35db0d214d7a143008bfc55891335cd29

  Message:
    Change branch conditions.

  Modified files:
    lib/map/da/basic/key_cursor.cpp

  Modified: lib/map/da/basic/key_cursor.cpp (+4 -4)
===================================================================
--- lib/map/da/basic/key_cursor.cpp    2013-03-22 10:50:45 +0900 (2fec9fe)
+++ lib/map/da/basic/key_cursor.cpp    2013-03-22 11:06:47 +0900 (c5bea0b)
@@ -71,12 +71,12 @@ void KeyCursor::open_cursor(Trie *trie, MapCursorFlags flags,
 }
 
 void KeyCursor::ascending_init(const Slice &min, const Slice &max) {
-  if (max.ptr() && (max.size() != 0)) {
+  if (max) {
     has_end_ = true;
     end_ = String(reinterpret_cast<const char *>(max.ptr()), max.size());
   }
 
-  if (!min.ptr() || (min.size() == 0)) {
+  if (!min) {
     node_ids_.push_back(ROOT_NODE_ID);
     return;
   }
@@ -139,12 +139,12 @@ void KeyCursor::ascending_init(const Slice &min, const Slice &max) {
 }
 
 void KeyCursor::descending_init(const Slice &min, const Slice &max) {
-  if (min.ptr() && (min.size() != 0)) {
+  if (min) {
     has_end_ = true;
     end_ = String(reinterpret_cast<const char *>(min.ptr()), min.size());
   }
 
-  if (!max.ptr() || (max.size() == 0)) {
+  if (!max) {
     node_ids_.push_back(ROOT_NODE_ID);
     return;
   }
-------------- next part --------------
HTML����������������������������...
Download 



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