diff options
| author | ruki <[email protected]> | 2025-11-09 19:54:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-09 19:54:35 +0800 |
| commit | 39189e3a1bd2979b7b454547b03e5926a8027431 (patch) | |
| tree | 79548f9fafae56213fa8feb14b35d79f29f01c16 /core/src/xmake/string | |
| parent | 91f6ed08fe32e36d555129efa4afdd82113f0eb4 (diff) | |
remove unused comments
Diffstat (limited to 'core/src/xmake/string')
| -rw-r--r-- | core/src/xmake/string/convert.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/string/endswith.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/string/lastof.c | 1 | ||||
| -rw-r--r-- | core/src/xmake/string/split.c | 1 | ||||
| -rw-r--r-- | core/src/xmake/string/startswith.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/string/trim.c | 5 |
6 files changed, 0 insertions, 13 deletions
diff --git a/core/src/xmake/string/convert.c b/core/src/xmake/string/convert.c index 65750d95e..88dc5ceb1 100644 --- a/core/src/xmake/string/convert.c +++ b/core/src/xmake/string/convert.c @@ -98,7 +98,6 @@ static xm_charset_entry_ref_t xm_string_charset_find_by_name(tb_char_t const *na * @endcode */ tb_int_t xm_string_convert(lua_State *lua) { - // check tb_assert_and_check_return_val(lua, 0); // get the string and charset types @@ -137,6 +136,5 @@ tb_int_t xm_string_convert(lua_State *lua) { tb_free(dst_data); } - // ok return 1; } diff --git a/core/src/xmake/string/endswith.c b/core/src/xmake/string/endswith.c index 5905610f6..f7e5e1805 100644 --- a/core/src/xmake/string/endswith.c +++ b/core/src/xmake/string/endswith.c @@ -34,7 +34,6 @@ * implementation */ tb_int_t xm_string_endswith(lua_State *lua) { - // check tb_assert_and_check_return_val(lua, 0); // get the string and suffix @@ -47,6 +46,5 @@ tb_int_t xm_string_endswith(lua_State *lua) { // string:endswith(suffix)? lua_pushboolean(lua, string_size >= suffix_size && !tb_strcmp(string + string_size - suffix_size, suffix)); - // ok return 1; } diff --git a/core/src/xmake/string/lastof.c b/core/src/xmake/string/lastof.c index c9df2213d..0d52e01ac 100644 --- a/core/src/xmake/string/lastof.c +++ b/core/src/xmake/string/lastof.c @@ -71,7 +71,6 @@ static tb_void_t xm_string_lastof_chr(lua_State *lua, tb_char_t const *cstr, tb_ * @param substr the substring */ tb_int_t xm_string_lastof(lua_State *lua) { - // check tb_assert_and_check_return_val(lua, 0); // get string diff --git a/core/src/xmake/string/split.c b/core/src/xmake/string/split.c index be2904f99..56e8a636d 100644 --- a/core/src/xmake/string/split.c +++ b/core/src/xmake/string/split.c @@ -101,7 +101,6 @@ static tb_void_t xm_string_split_chr( * @param limit the limit count */ tb_int_t xm_string_split(lua_State *lua) { - // check tb_assert_and_check_return_val(lua, 0); // get string diff --git a/core/src/xmake/string/startswith.c b/core/src/xmake/string/startswith.c index c7fe9dcca..04b53ffa7 100644 --- a/core/src/xmake/string/startswith.c +++ b/core/src/xmake/string/startswith.c @@ -34,7 +34,6 @@ * implementation */ tb_int_t xm_string_startswith(lua_State *lua) { - // check tb_assert_and_check_return_val(lua, 0); // get the string and prefix @@ -46,6 +45,5 @@ tb_int_t xm_string_startswith(lua_State *lua) { // string:startswith(prefix)? lua_pushboolean(lua, !tb_strncmp(string, prefix, (tb_size_t)prefix_size)); - // ok return 1; } diff --git a/core/src/xmake/string/trim.c b/core/src/xmake/string/trim.c index d22f86666..c1dcdad8d 100644 --- a/core/src/xmake/string/trim.c +++ b/core/src/xmake/string/trim.c @@ -34,7 +34,6 @@ * private implementation */ static tb_void_t xm_string_trim_space(tb_char_t const **psstr, tb_char_t const **pestr, tb_int_t mode) { - // check tb_assert(psstr && pestr && *psstr && *pestr); tb_char_t const *p = *psstr; @@ -62,7 +61,6 @@ static tb_char_t const *xm_string_ltrim(tb_char_t const *sstr, tb_char_t const *estr, tb_char_t const *ctrim, size_t ntrim) { - // check tb_assert(sstr && estr && ctrim); tb_char_t const *p = sstr; @@ -75,7 +73,6 @@ static tb_char_t const *xm_string_rtrim(tb_char_t const *sstr, tb_char_t const *estr, tb_char_t const *ctrim, size_t ntrim) { - // check tb_assert(sstr && estr && ctrim); tb_char_t const *p = estr - 1; @@ -100,7 +97,6 @@ static tb_char_t const *xm_string_rtrim(tb_char_t const *sstr, * @endcode */ tb_int_t xm_string_trim(lua_State *lua) { - // check tb_assert_and_check_return_val(lua, 0); size_t lstr, ltrim; @@ -127,7 +123,6 @@ tb_int_t xm_string_trim(lua_State *lua) { // no trimed chars tb_check_break(sstr != rsstr || estr != restr); - // ok lua_pushlstring(lua, sstr, estr - sstr); return 1; |
