set const on the first parameter to hawk_trim_uchars() and hawk_trim_bchars()

This commit is contained in:
hyung-hwan 2021-07-16 08:16:43 +00:00
parent 23715c35ef
commit 02aa80e9c2
2 changed files with 12 additions and 12 deletions

View File

@ -694,13 +694,13 @@ HAWK_EXPORT hawk_oow_t hawk_rotate_bchars (
); );
HAWK_EXPORT hawk_uch_t* hawk_trim_uchars ( HAWK_EXPORT hawk_uch_t* hawk_trim_uchars (
hawk_uch_t* str, const hawk_uch_t* str,
hawk_oow_t* len, hawk_oow_t* len,
int flags int flags
); );
HAWK_EXPORT hawk_bch_t* hawk_trim_bchars ( HAWK_EXPORT hawk_bch_t* hawk_trim_bchars (
hawk_bch_t* str, const hawk_bch_t* str,
hawk_oow_t* len, hawk_oow_t* len,
int flags int flags
); );

View File

@ -942,9 +942,9 @@ hawk_oow_t hawk_rotate_bchars (hawk_bch_t* str, hawk_oow_t len, int dir, hawk_oo
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
hawk_uch_t* hawk_trim_uchars (hawk_uch_t* str, hawk_oow_t* len, int flags) hawk_uch_t* hawk_trim_uchars (const hawk_uch_t* str, hawk_oow_t* len, int flags)
{ {
hawk_uch_t* p = str, * end = str + *len; const hawk_uch_t* p = str, * end = str + *len;
if (p < end) if (p < end)
{ {
@ -981,12 +981,12 @@ hawk_uch_t* hawk_trim_uchars (hawk_uch_t* str, hawk_oow_t* len, int flags)
} }
} }
return str; return (hawk_uch_t*)str;
} }
hawk_bch_t* hawk_trim_bchars (hawk_bch_t* str, hawk_oow_t* len, int flags) hawk_bch_t* hawk_trim_bchars (const hawk_bch_t* str, hawk_oow_t* len, int flags)
{ {
hawk_bch_t* p = str, * end = str + *len; const hawk_bch_t* p = str, * end = str + *len;
if (p < end) if (p < end)
{ {
@ -1023,7 +1023,7 @@ hawk_bch_t* hawk_trim_bchars (hawk_bch_t* str, hawk_oow_t* len, int flags)
} }
} }
return str; return (hawk_bch_t*)str;
} }
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */