[Groonga-commit] groonga/grnxx at f6fa2e7 [master] Skip memory allocation if a new value is N/A.

Back to archive index

susumu.yata null+****@clear*****
Tue Dec 16 11:03:05 JST 2014


susumu.yata	2014-11-06 19:27:58 +0900 (Thu, 06 Nov 2014)

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

  Message:
    Skip memory allocation if a new value is N/A.

  Modified files:
    lib/grnxx/impl/column/scalar/bool.cpp

  Modified: lib/grnxx/impl/column/scalar/bool.cpp (+4 -0)
===================================================================
--- lib/grnxx/impl/column/scalar/bool.cpp    2014-11-06 19:10:41 +0900 (cf3b231)
+++ lib/grnxx/impl/column/scalar/bool.cpp    2014-11-06 19:27:58 +0900 (1d9f03f)
@@ -18,6 +18,10 @@ void Column<Bool>::set(Int row_id, const Datum &datum) {
   if (!table_->test_row(row_id)) {
     throw "Invalid row ID";  // TODO
   }
+  if (value.is_na()) {
+    unset(row_id);
+    return;
+  }
   size_t value_id = row_id.value();
   if (value_id >= values_.size()) {
     values_.resize(value_id + 1, Bool::na());
-------------- next part --------------
HTML����������������������������...
Télécharger 



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