[Groonga-commit] groonga/grnxx at 1c387ec [master] Fix a bug of XorMerger. (#66)

Back to archive index

susumu.yata null+****@clear*****
Wed Sep 24 13:22:44 JST 2014


susumu.yata	2014-09-24 13:22:44 +0900 (Wed, 24 Sep 2014)

  New Revision: 1c387ec82b842649e9b2c848c64ca624c9a72eb2
  https://github.com/groonga/grnxx/commit/1c387ec82b842649e9b2c848c64ca624c9a72eb2

  Message:
    Fix a bug of XorMerger. (#66)

  Modified files:
    lib/grnxx/merger.cpp

  Modified: lib/grnxx/merger.cpp (+4 -1)
===================================================================
--- lib/grnxx/merger.cpp    2014-09-24 13:15:01 +0900 (1b9e0cd)
+++ lib/grnxx/merger.cpp    2014-09-24 13:22:44 +0900 (00e84d9)
@@ -501,7 +501,10 @@ bool XorMerger::finish(Error *error) {
         break;
       }
       case MINUS_MERGER_OPERATOR: {
-        it.second = stream_is_1 ? -it.second : 0.0;
+        if (stream_is_1) {
+          it.second = -it.second;
+        }
+        break;
       }
       case MULTIPLICATION_MERGER_OPERATOR: {
         // TODO: I'm not sure if it.second should be used?
-------------- next part --------------
HTML����������������������������...
Download 



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