From ee62e8f615cf2fe557faa4cff61dbe147033f7d7 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 7 Jul 2014 16:33:36 +0200 Subject: [PATCH] fix CLucene build for MSVC 2013 Commit qtbase/9f0e5d00ab51cc7c0dc87c8d72f48c4e6edaf120 added the /Zc:strictStrings compiler option to MSVC 2013 builds. We're circumventing the problem by throwing const_casts into the code. Change-Id: I45cc647b780f834b756caed92c4d6f9a50a53664 Reviewed-by: Friedemann Kleint Reviewed-by: Karsten Heimrich --- src/assistant/3rdparty/clucene/src/CLucene/StdHeader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/assistant/3rdparty/clucene/src/CLucene/StdHeader.cpp b/src/assistant/3rdparty/clucene/src/CLucene/StdHeader.cpp index 98805a6..4318c7d 100644 --- a/src/assistant/3rdparty/clucene/src/CLucene/StdHeader.cpp +++ b/src/assistant/3rdparty/clucene/src/CLucene/StdHeader.cpp @@ -24,8 +24,10 @@ CL_NS_USE(util) -TCHAR* _LUCENE_BLANK_STRING = _T(""); -char* _LUCENE_BLANK_ASTRING = ""; +const TCHAR *_CONST_LUCENE_BLANK_STRING = _T(""); +const char *_CONST_LUCENE_BLANK_ASTRING = ""; +TCHAR* _LUCENE_BLANK_STRING = const_cast(_CONST_LUCENE_BLANK_STRING); +char* _LUCENE_BLANK_ASTRING = const_cast(_CONST_LUCENE_BLANK_ASTRING); #ifndef Q_CC_MIPS #if defined(_LUCENE_THREADMUTEX_USINGDEFAULT) -- 2.7.4