mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
avoid warning in g++
This commit is contained in:
parent
16e6ac0819
commit
12d3741562
@ -28,7 +28,7 @@ namespace Limonp
|
||||
to.resize(from_size * 2); // iconv failed, may be you can raise this 2 to bigger number.
|
||||
char * pto = (char*)to.c_str();
|
||||
size_t to_size = to.size();
|
||||
if(-1 == iconv(_iconv_handle, &pfrom, &from_size, &pto, &to_size))
|
||||
if(size_t(-1) == iconv(_iconv_handle, &pfrom, &from_size, &pto, &to_size))
|
||||
{
|
||||
to.clear();
|
||||
return false;
|
||||
|
@ -49,7 +49,7 @@ namespace Limonp
|
||||
#ifdef LOGGER_LEVEL
|
||||
if(level < LOGGER_LEVEL) return;
|
||||
#endif
|
||||
size_t size = 256;
|
||||
int size = 256;
|
||||
string msg;
|
||||
va_list ap;
|
||||
while (1) {
|
||||
|
@ -29,7 +29,7 @@ namespace Limonp
|
||||
|
||||
inline void string_format(string& res, const char* fmt, ...)
|
||||
{
|
||||
size_t size = 256;
|
||||
int size = 256;
|
||||
va_list ap;
|
||||
res.clear();
|
||||
while (1) {
|
||||
@ -49,7 +49,7 @@ namespace Limonp
|
||||
}
|
||||
inline string string_format(const char* fmt, ...)
|
||||
{
|
||||
size_t size = 256;
|
||||
int size = 256;
|
||||
std::string str;
|
||||
va_list ap;
|
||||
while (1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user