From 053cf8ccb7de0c72b9aea47937876a03c99fa938 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 25 Jun 2012 12:58:01 +0200 Subject: [PATCH] Clucene: Fixed MSVC2011 build. This is basically taken from Qt 4.8 / 69f84b9514f8f22d27590ac890dbd20aec369702. Clucene is broken in MVS2011 due to changed stdext::hash_map which is used as the ancestor in inner CLucene classes. It ended up with names collision and double inheritance from the one base class. Fix reflects that change. Change-Id: Ia733c3b51dafc5d22674cc3822e6305819582429 Initial-patch-by: Eugene Shcherbina Reviewed-by: Karsten Heimrich --- src/assistant/3rdparty/clucene/src/CLucene/debug/mem.h | 4 ++-- src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h | 9 ++++----- src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h | 9 ++++----- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/assistant/3rdparty/clucene/src/CLucene/debug/mem.h b/src/assistant/3rdparty/clucene/src/CLucene/debug/mem.h index e15c3de..c208147 100644 --- a/src/assistant/3rdparty/clucene/src/CLucene/debug/mem.h +++ b/src/assistant/3rdparty/clucene/src/CLucene/debug/mem.h @@ -16,10 +16,10 @@ //Macro for creating new objects #if defined(LUCENE_ENABLE_MEMLEAKTRACKING) #define _CLNEW new(__FILE__, __LINE__) - #define LUCENE_BASE public CL_NS(debug)::LuceneBase + #define LUCENE_BASE public virtual CL_NS(debug)::LuceneBase #elif defined(LUCENE_ENABLE_REFCOUNT) #define _CLNEW new - #define LUCENE_BASE public CL_NS(debug)::LuceneBase + #define LUCENE_BASE public virtual CL_NS(debug)::LuceneBase #else #define _CLNEW new #define LUCENE_BASE public CL_NS(debug)::LuceneVoidBase diff --git a/src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h b/src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h index cd69088..b31baba 100644 --- a/src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h +++ b/src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h @@ -19,16 +19,15 @@ CL_NS_DEF(util) * A template to encapsulate various list type classes * @internal */ -template -class __CLList:public _base,LUCENE_BASE { +template +class __CLList:public base,LUCENE_BASE { private: bool dv; - typedef _base base; public: DEFINE_MUTEX(THIS_LOCK) - typedef typename _base::const_iterator const_iterator; - typedef typename _base::iterator iterator; + typedef typename base::const_iterator const_iterator; + typedef typename base::iterator iterator; virtual ~__CLList(){ clear(); diff --git a/src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h b/src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h index b22b507..1153a01 100644 --- a/src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h +++ b/src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h @@ -19,19 +19,18 @@ CL_NS_DEF(util) * @internal */ template -class __CLMap:public _base,LUCENE_BASE { +class __CLMap: public base, LUCENE_BASE { private: bool dk; bool dv; - typedef _base base; public: DEFINE_MUTEX(THIS_LOCK) - typedef typename _base::iterator iterator; - typedef typename _base::const_iterator const_iterator; + typedef typename base::iterator iterator; + typedef typename base::const_iterator const_iterator; typedef CL_NS_STD(pair)<_kt, _vt> _pair; ///Default constructor for the __CLMap -- 2.7.4