Fix narrowing conversion compile error
authorJonathan Liu <net147@gmail.com>
Tue, 4 Sep 2012 11:49:57 +0000 (21:49 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 4 Sep 2012 12:31:20 +0000 (14:31 +0200)
Explicitly specify conversion from int to TCHAR to avoid a narrowing
conversion compile error when compiling with GCC option -std=c++0x.

Change-Id: I15d71502e4fd51f85adf7d3fc1c83cf135c4b420
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/assistant/3rdparty/clucene/src/CLucene/queryParser/Lexer.cpp

index 861c5d3..d147f8b 100644 (file)
@@ -117,7 +117,7 @@ bool Lexer::GetNextToken(QueryToken* token) {
       if( _istspace(ch)!=0 ) {
          continue;
       }
-      TCHAR buf[2] = {ch,'\0'};
+      TCHAR buf[2] = {TCHAR(ch),'\0'};
       switch(ch) {
          case '+':
             token->set(buf, QueryToken::PLUS);