summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-06-03 17:26:54 +0200
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2015-06-04 10:23:19 +0000
commit78beb4c7d337356d6f478d84b2e7b1fa227a2c3a (patch)
tree8298acfed8944b278507f04154e65fed261c489f
parentc124557e80537427e0e532ed92ef39a30471f3d1 (diff)
downloadqttools-78beb4c7d337356d6f478d84b2e7b1fa227a2c3a.tar.gz
Fix CLucene compile error with VS 2015.
Task-number: QTBUG-45961 Task-number: QTBUG-45976 Task-number: QTBUG-46344 Change-Id: Ic001298e96ae474a4939c445b7816a331135dd53 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--src/assistant/3rdparty/clucene/src/CLucene/StdHeader.h5
-rw-r--r--src/assistant/3rdparty/clucene/src/CLucene/config/CompilerGcc.h2
-rw-r--r--src/assistant/3rdparty/clucene/src/CLucene/config/CompilerMsvc.h16
-rw-r--r--src/assistant/3rdparty/clucene/src/CLucene/debug/condition.cpp2
-rw-r--r--src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h4
-rw-r--r--src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h24
6 files changed, 36 insertions, 17 deletions
diff --git a/src/assistant/3rdparty/clucene/src/CLucene/StdHeader.h b/src/assistant/3rdparty/clucene/src/CLucene/StdHeader.h
index 439bc948a..97799142b 100644
--- a/src/assistant/3rdparty/clucene/src/CLucene/StdHeader.h
+++ b/src/assistant/3rdparty/clucene/src/CLucene/StdHeader.h
@@ -122,7 +122,10 @@ extern int _lucene_counter_break; //can set a watch on this
#error "CLucene can't compile without the vector header"
#endif
-#if !defined(LUCENE_DISABLE_HASHING) && defined(_CL_HAVE_HASH_MAP) && defined(_CL_HAVE_HASH_SET)
+#if !defined(LUCENE_DISABLE_HASHING) && defined(_CL_HAVE_STD_UNORDERED_MAP) && defined(_CL_HAVE_STD_UNORDERED_SET)
+ #include <unordered_map>
+ #include <unordered_set>
+#elif !defined(LUCENE_DISABLE_HASHING) && defined(_CL_HAVE_HASH_MAP) && defined(_CL_HAVE_HASH_SET)
//hashing is all or nothing!
#include <hash_map>
#include <hash_set>
diff --git a/src/assistant/3rdparty/clucene/src/CLucene/config/CompilerGcc.h b/src/assistant/3rdparty/clucene/src/CLucene/config/CompilerGcc.h
index 3bf91b369..6aac690e2 100644
--- a/src/assistant/3rdparty/clucene/src/CLucene/config/CompilerGcc.h
+++ b/src/assistant/3rdparty/clucene/src/CLucene/config/CompilerGcc.h
@@ -45,6 +45,8 @@
#define CL_NS_HASHING(func) __gnu_cxx::func
#define LUCENE_DISABLE_HASHING //we could enable this, but so far test show that the hashing is slower :(
+#define CL_HASH_MAP hash_map
+#define CL_HASH_SET hash_set
//define the file functions
#define fileSeek lseek
diff --git a/src/assistant/3rdparty/clucene/src/CLucene/config/CompilerMsvc.h b/src/assistant/3rdparty/clucene/src/CLucene/config/CompilerMsvc.h
index 8578859f0..6b3f7683e 100644
--- a/src/assistant/3rdparty/clucene/src/CLucene/config/CompilerMsvc.h
+++ b/src/assistant/3rdparty/clucene/src/CLucene/config/CompilerMsvc.h
@@ -27,8 +27,22 @@
#if (_MSC_VER < 1310) || defined(_STLPORT_VERSION)
#define CL_NS_HASHING(func) std::func //the namespace is different on VC 7.0
#else
- #define CL_NS_HASHING(func) stdext::func
+ #if _MSC_VER >= 1900
+ #undef _CL_HAVE_EXT_HASH_MAP
+ #undef _CL_HAVE_EXT_HASH_SET
+
+ #define CL_HASH_MAP unordered_map
+ #define CL_HASH_SET unordered_set
+ #define _CL_HAVE_STD_UNORDERED_MAP 1
+ #define _CL_HAVE_STD_UNORDERED_SET 1
+ #define CL_NS_HASHING(func) std::func
+ #else
+ #define CL_HASH_MAP hash_map
+ #define CL_HASH_SET hash_set
+ #define CL_NS_HASHING(func) stdext::func
+ #endif
#endif
+
#define LUCENE_STATIC_CONSTANT_SYNTAX 1
#if _MSC_FULL_VER >= 140050320
diff --git a/src/assistant/3rdparty/clucene/src/CLucene/debug/condition.cpp b/src/assistant/3rdparty/clucene/src/CLucene/debug/condition.cpp
index 855419451..7fab8d71d 100644
--- a/src/assistant/3rdparty/clucene/src/CLucene/debug/condition.cpp
+++ b/src/assistant/3rdparty/clucene/src/CLucene/debug/condition.cpp
@@ -37,7 +37,7 @@ void _Cnd_OutDebug( const char* FormattedMsg, const char* StrTitle, const char*
void __cnd_FormatDebug( const char* File, int32_t Line, int32_t Title, const char* Mes2, int32_t fatal ) {
char M[512];
- char* StrTitle = NULL;
+ const char* StrTitle = NULL;
if( Mes2 )
_snprintf(M,512,"file:%s line:%d\n%s",File,Line,Mes2);
diff --git a/src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h b/src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h
index b31baba8a..5deb69dae 100644
--- a/src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h
+++ b/src/assistant/3rdparty/clucene/src/CLucene/util/VoidList.h
@@ -139,11 +139,11 @@ public:
template<typename _kt,
typename _Comparator=CL_NS(util)::Compare::TChar,
typename _valueDeletor=CL_NS(util)::Deletor::Dummy>
-class CLHashList:public __CLList<_kt, CL_NS_HASHING(hash_set)<_kt,_Comparator> , _valueDeletor>
+class CLHashList:public __CLList<_kt, CL_NS_HASHING(CL_HASH_SET)<_kt,_Comparator> , _valueDeletor>
{
public:
CLHashList ( const bool deleteValue=true ):
- __CLList<_kt, CL_NS_HASHING(hash_set)<_kt,_Comparator> , _valueDeletor>(deleteValue)
+ __CLList<_kt, CL_NS_HASHING(CL_HASH_SET)<_kt,_Comparator> , _valueDeletor>(deleteValue)
{
}
};
diff --git a/src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h b/src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h
index 1153a0160..223670204 100644
--- a/src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h
+++ b/src/assistant/3rdparty/clucene/src/CLucene/util/VoidMap.h
@@ -153,16 +153,16 @@ public:
//a CLSet with CLHashMap traits
template<typename _kt, typename _vt,
- typename _Compare,
+ typename CL_Compare,
typename _EqualDummy,
typename _KeyDeletor=CL_NS(util)::Deletor::Dummy,
typename _ValueDeletor=CL_NS(util)::Deletor::Dummy>
class CLHashMap:public __CLMap<_kt,_vt,
- CL_NS_STD(map)<_kt,_vt, _Compare>,
+ CL_NS_STD(map)<_kt,_vt, CL_Compare>,
_KeyDeletor,_ValueDeletor>
{
- typedef typename CL_NS_STD(map)<_kt,_vt,_Compare> _base;
- typedef __CLMap<_kt, _vt, CL_NS_STD(map)<_kt,_vt, _Compare>,
+ typedef typename CL_NS_STD(map)<_kt,_vt,CL_Compare> _base;
+ typedef __CLMap<_kt, _vt, CL_NS_STD(map)<_kt,_vt, CL_Compare>,
_KeyDeletor,_ValueDeletor> _this;
public:
CLHashMap ( const bool deleteKey=false, const bool deleteValue=false )
@@ -180,10 +180,10 @@ template<typename _kt, typename _vt,
typename _KeyDeletor=CL_NS(util)::Deletor::Dummy,
typename _ValueDeletor=CL_NS(util)::Deletor::Dummy>
class CLHashMap:public __CLMap<_kt,_vt,
- CL_NS_HASHING(hash_map)<_kt,_vt, _Hasher,_Equals>,
+ CL_NS_HASHING(CL_HASH_MAP)<_kt,_vt, _Hasher,_Equals>,
_KeyDeletor,_ValueDeletor>
{
- typedef __CLMap<_kt,_vt, CL_NS_HASHING(hash_map)<_kt,_vt, _Hasher,_Equals>,
+ typedef __CLMap<_kt,_vt, CL_NS_HASHING(CL_HASH_MAP)<_kt,_vt, _Hasher,_Equals>,
_KeyDeletor,_ValueDeletor> _this;
public:
CLHashMap ( const bool deleteKey=false, const bool deleteValue=false )
@@ -201,10 +201,10 @@ template<typename _kt, typename _vt,
typename _KeyDeletor=CL_NS(util)::Deletor::Dummy,
typename _ValueDeletor=CL_NS(util)::Deletor::Dummy>
class CLHashMap:public __CLMap<_kt,_vt,
- CL_NS_HASHING(hash_map)<_kt,_vt, _Hasher>,
+ CL_NS_HASHING(CL_HASH_MAP)<_kt,_vt, _Hasher>,
_KeyDeletor,_ValueDeletor>
{
- typedef __CLMap<_kt,_vt, CL_NS_HASHING(hash_map)<_kt,_vt, _Hasher>,
+ typedef __CLMap<_kt,_vt, CL_NS_HASHING(CL_HASH_MAP)<_kt,_vt, _Hasher>,
_KeyDeletor,_ValueDeletor> _this;
public:
CLHashMap ( const bool deleteKey=false, const bool deleteValue=false )
@@ -218,15 +218,15 @@ public:
//A collection that contains no duplicates
//does not guarantee that the order will remain constant over time
template<typename _kt, typename _vt,
- typename _Compare,
+ typename CL_Compare,
typename _KeyDeletor=CL_NS(util)::Deletor::Dummy,
typename _ValueDeletor=CL_NS(util)::Deletor::Dummy>
class CLSet:public __CLMap<_kt,_vt,
- CL_NS_STD(map)<_kt,_vt, _Compare>,
+ CL_NS_STD(map)<_kt,_vt, CL_Compare>,
_KeyDeletor,_ValueDeletor>
{
- typedef typename CL_NS_STD(map)<_kt,_vt,_Compare> _base;
- typedef __CLMap<_kt, _vt, CL_NS_STD(map)<_kt,_vt, _Compare>,
+ typedef typename CL_NS_STD(map)<_kt,_vt,CL_Compare> _base;
+ typedef __CLMap<_kt, _vt, CL_NS_STD(map)<_kt,_vt, CL_Compare>,
_KeyDeletor,_ValueDeletor> _this;
public:
CLSet ( const bool deleteKey=false, const bool deleteValue=false )