mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
remove some warning of compiler
This commit is contained in:
parent
229fcd715f
commit
14aa9168d3
@ -3,7 +3,7 @@ PROJECT(CPPJIEBA)
|
|||||||
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
|
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
|
||||||
|
|
||||||
SET(CMAKE_INSTALL_PREFIX /usr)
|
SET(CMAKE_INSTALL_PREFIX /usr)
|
||||||
ADD_DEFINITIONS(-std=c++0x -O3)
|
ADD_DEFINITIONS(-std=c++0x -O3 -Wall)
|
||||||
IF (DEFINED ENC)
|
IF (DEFINED ENC)
|
||||||
ADD_DEFINITIONS(-DCPPJIEBA_${ENC})
|
ADD_DEFINITIONS(-DCPPJIEBA_${ENC})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -71,7 +71,7 @@ namespace CppJieba
|
|||||||
for (vector<pair<uint, const TrieNodeInfo*> >::const_iterator itr = tRes.begin(); itr != tRes.end(); itr++)
|
for (vector<pair<uint, const TrieNodeInfo*> >::const_iterator itr = tRes.begin(); itr != tRes.end(); itr++)
|
||||||
{
|
{
|
||||||
wordLen = itr->second->word.size();
|
wordLen = itr->second->word.size();
|
||||||
if (wordLen >= 2 || tRes.size() == 1 && maxIdx <= uIdx)
|
if (wordLen >= 2 || (tRes.size() == 1 && maxIdx <= uIdx))
|
||||||
{
|
{
|
||||||
res.push_back(itr->second->word);
|
res.push_back(itr->second->word);
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
namespace Limonp
|
namespace Limonp
|
||||||
{
|
{
|
||||||
|
|
||||||
#pragma region MD5 defines
|
//#pragma region MD5 defines
|
||||||
// Constants for MD5Transform routine.
|
// Constants for MD5Transform routine.
|
||||||
#define S11 7
|
#define S11 7
|
||||||
#define S12 12
|
#define S12 12
|
||||||
@ -85,7 +85,7 @@ namespace Limonp
|
|||||||
(a) = ROTATE_LEFT ((a), (s)); \
|
(a) = ROTATE_LEFT ((a), (s)); \
|
||||||
(a) += (b); \
|
(a) += (b); \
|
||||||
}
|
}
|
||||||
#pragma endregion
|
//#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
typedef unsigned char BYTE ;
|
typedef unsigned char BYTE ;
|
||||||
@ -115,7 +115,7 @@ private:
|
|||||||
unsigned char buffer[64]; /* input buffer */
|
unsigned char buffer[64]; /* input buffer */
|
||||||
} context ;
|
} context ;
|
||||||
|
|
||||||
#pragma region static helper functions
|
//#pragma region static helper functions
|
||||||
// The core of the MD5 algorithm is here.
|
// The core of the MD5 algorithm is here.
|
||||||
// MD5 basic transformation. Transforms state based on block.
|
// MD5 basic transformation. Transforms state based on block.
|
||||||
static void MD5Transform( UINT4 state[4], unsigned char block[64] )
|
static void MD5Transform( UINT4 state[4], unsigned char block[64] )
|
||||||
@ -229,7 +229,7 @@ private:
|
|||||||
output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
|
output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
|
||||||
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
|
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
|
||||||
}
|
}
|
||||||
#pragma endregion
|
//#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -354,7 +354,7 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while( len = fread( buffer, 1, 1024, file ) )
|
while( (len = fread( buffer, 1, 1024, file )) )
|
||||||
Update( buffer, len ) ;
|
Update( buffer, len ) ;
|
||||||
Final();
|
Final();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user