set const on the first parameter to mio_trim_uchars() and mio_trim_bchars()

This commit is contained in:
hyung-hwan 2021-07-16 08:12:01 +00:00
parent 07677a7080
commit bc956b757d
2 changed files with 12 additions and 13 deletions

View File

@ -469,18 +469,17 @@ MIO_EXPORT mio_bch_t* mio_find_bchar_in_bcstr (
);
MIO_EXPORT mio_uch_t* mio_trim_uchars (
mio_uch_t* str,
const mio_uch_t* str,
mio_oow_t* len,
int flags
);
MIO_EXPORT mio_bch_t* mio_trim_bchars (
mio_bch_t* str,
const mio_bch_t* str,
mio_oow_t* len,
int flags
);
MIO_EXPORT int mio_split_ucstr (
mio_uch_t* s,
const mio_uch_t* delim,

View File

@ -639,9 +639,9 @@ const mio_uch_t* mio_find_ucstr_word_in_ucstr (const mio_uch_t* str, const mio_u
/* ========================================================================= */
mio_uch_t* mio_trim_uchars (mio_uch_t* str, mio_oow_t* len, int flags)
mio_uch_t* mio_trim_uchars (const mio_uch_t* str, mio_oow_t* len, int flags)
{
mio_uch_t* p = str, * end = str + *len;
const mio_uch_t* p = str, * end = str + *len;
if (p < end)
{
@ -678,12 +678,12 @@ mio_uch_t* mio_trim_uchars (mio_uch_t* str, mio_oow_t* len, int flags)
}
}
return str;
return (mio_uch_t*)str;
}
mio_bch_t* mio_trim_bchars (mio_bch_t* str, mio_oow_t* len, int flags)
mio_bch_t* mio_trim_bchars (const mio_bch_t* str, mio_oow_t* len, int flags)
{
mio_bch_t* p = str, * end = str + *len;
const mio_bch_t* p = str, * end = str + *len;
if (p < end)
{
@ -720,7 +720,7 @@ mio_bch_t* mio_trim_bchars (mio_bch_t* str, mio_oow_t* len, int flags)
}
}
return str;
return (mio_bch_t*)str;
}
/* ========================================================================= */