Hello,
Please find attached 2 patches. One is a trivial cleanup so that the
2nd patch can follow the same pattern as the other put functions in
that file without introducing a silly ;;
The second one probably solves a real bug. I discovered this while
compiling Libreoffice with Clang which warns that the v value is
unused in put. So I'm interested in committing this patch since
without it clients like Libreoffice can't compile with -Werror. I'm
not familiar with the code and I've never used CLucene before but I
suppose both patches are correct since they're quite trivial.
In case this is needed for accepting the contribution: patches are
under LGPL or Apache Version 2.0.
Catalin Iacob
From 59f553d49b84f155e56c39353b294774defbea91 Mon Sep 17 00:00:00 2001
From: Catalin Iacob <iacobcata...@gmail.com>
Date: Sun, 25 Mar 2012 16:25:05 +0200
Subject: [PATCH 1/2] Remove extra semicolon
---
src/core/CLucene/util/VoidMap.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/core/CLucene/util/VoidMap.h b/src/core/CLucene/util/VoidMap.h
index b666dcf..fbe747d 100644
--- a/src/core/CLucene/util/VoidMap.h
+++ b/src/core/CLucene/util/VoidMap.h
@@ -177,7 +177,7 @@ public:
if ( _this::dk || _this::dv )
_this::remove(k);
- (*this)[k] = v;;
+ (*this)[k] = v;
}
};
@@ -211,7 +211,7 @@ public:
if ( _this::dk || _this::dv )
_this::remove(k);
- (*this)[k] = v;;
+ (*this)[k] = v;
}
};
@@ -246,7 +246,7 @@ public:
if ( _this::dk || _this::dv )
_this::remove(k);
- (*this)[k] = v;;
+ (*this)[k] = v;
}
};
@@ -281,7 +281,7 @@ public:
if ( _this::dk || _this::dv )
_this::remove(k);
- (*this)[k] = v;;
+ (*this)[k] = v;
}
};
--
1.7.9.2
From 990efd708a5ab8419f6c0eb9b4a21eeb70a8da51 Mon Sep 17 00:00:00 2001
From: Catalin Iacob <iacobcata...@gmail.com>
Date: Sun, 25 Mar 2012 16:35:20 +0200
Subject: [PATCH 2/2] Actually insert into CLMultimap on put
---
src/core/CLucene/util/VoidMap.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/core/CLucene/util/VoidMap.h b/src/core/CLucene/util/VoidMap.h
index fbe747d..b41a009 100644
--- a/src/core/CLucene/util/VoidMap.h
+++ b/src/core/CLucene/util/VoidMap.h
@@ -316,6 +316,7 @@ public:
if ( _this::dk || _this::dv )
_this::remove(k);
+ (*this)[k] = v;
}
};
--
1.7.9.2
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers