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.
|
to.resize(from_size * 2); // iconv failed, may be you can raise this 2 to bigger number.
|
||||||
char * pto = (char*)to.c_str();
|
char * pto = (char*)to.c_str();
|
||||||
size_t to_size = to.size();
|
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();
|
to.clear();
|
||||||
return false;
|
return false;
|
||||||
|
@ -49,7 +49,7 @@ namespace Limonp
|
|||||||
#ifdef LOGGER_LEVEL
|
#ifdef LOGGER_LEVEL
|
||||||
if(level < LOGGER_LEVEL) return;
|
if(level < LOGGER_LEVEL) return;
|
||||||
#endif
|
#endif
|
||||||
size_t size = 256;
|
int size = 256;
|
||||||
string msg;
|
string msg;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -29,7 +29,7 @@ namespace Limonp
|
|||||||
|
|
||||||
inline void string_format(string& res, const char* fmt, ...)
|
inline void string_format(string& res, const char* fmt, ...)
|
||||||
{
|
{
|
||||||
size_t size = 256;
|
int size = 256;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
res.clear();
|
res.clear();
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -49,7 +49,7 @@ namespace Limonp
|
|||||||
}
|
}
|
||||||
inline string string_format(const char* fmt, ...)
|
inline string string_format(const char* fmt, ...)
|
||||||
{
|
{
|
||||||
size_t size = 256;
|
int size = 256;
|
||||||
std::string str;
|
std::string str;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user