[Groonga-commit] groonga/grnxx [master] Change the conditions for copying small values.

Back to archive index

susumu.yata null+****@clear*****
Tue Dec 11 19:03:36 JST 2012


susumu.yata	2012-12-11 19:03:36 +0900 (Tue, 11 Dec 2012)

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

  Log:
    Change the conditions for copying small values.

  Modified files:
    lib/alpha/blob_vector.hpp

  Modified: lib/alpha/blob_vector.hpp (+2 -2)
===================================================================
--- lib/alpha/blob_vector.hpp    2012-12-11 19:02:48 +0900 (b5c4430)
+++ lib/alpha/blob_vector.hpp    2012-12-11 19:03:36 +0900 (5458300)
@@ -289,7 +289,7 @@ class Blob {
 
   // Note: address_ refers to the own value if it is small.
   Blob(const Blob &rhs) : address_(), length_(rhs.length_), cell_(rhs.cell_) {
-    if (cell_.type() == BLOB_VECTOR_SMALL) {
+    if (rhs.address() == rhs.cell_.value()) {
       address_ = cell_.value();
     } else {
       address_ = rhs.address_;
@@ -298,7 +298,7 @@ class Blob {
   Blob &operator=(const Blob &rhs) {
     length_ = rhs.length_;
     cell_ = rhs.cell_;
-    if (cell_.type() == BLOB_VECTOR_SMALL) {
+    if (rhs.address() == rhs.cell_.value()) {
       address_ = cell_.value();
     } else {
       address_ = rhs.address_;
-------------- next part --------------
HTML����������������������������...
Download 



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