Skip to content

Commit f1d8354

Browse files
committed
tiny fix to save/restore pos type
1 parent 46aa872 commit f1d8354

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

runtime-light/stdlib/rpc/rpc-tl-builtins.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ inline void register_tl_storers_table_and_fetcher(const array<tl_storer_ptr>& ge
2828
rpc_mutable_image_state.tl_fetch_wrapper = gen$t_ReqResult_fetch;
2929
}
3030

31-
inline int tl_parse_save_pos() noexcept {
31+
inline size_t tl_parse_save_pos() noexcept {
3232
return RpcServerInstanceState::get().tl_fetcher.pos();
3333
}
3434

35-
inline bool tl_parse_restore_pos(int pos) noexcept {
35+
inline bool tl_parse_restore_pos(size_t pos) noexcept {
3636
auto& tl_fetcher{RpcServerInstanceState::get().tl_fetcher};
37-
if (pos < 0 || pos > tl_fetcher.pos()) [[unlikely]] {
37+
if (pos > tl_fetcher.pos()) [[unlikely]] {
3838
return false;
3939
}
4040
tl_fetcher.reset(pos);

0 commit comments

Comments
 (0)