From c7f2a271ae29066744cf09499f744a0c6b89a27e Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 25 Jun 2009 08:12:36 -0700 Subject: Small improvement to bitmasking that generates better code. --- upb_msg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upb_msg.h b/upb_msg.h index 54ca82d..407daa1 100644 --- a/upb_msg.h +++ b/upb_msg.h @@ -209,7 +209,7 @@ INLINE size_t upb_isset_offset(uint32_t field_index) { return field_index / 8; } -INLINE size_t upb_isset_mask(uint32_t field_index) { +INLINE uint8_t upb_isset_mask(uint32_t field_index) { return 1 << (field_index % 8); } -- cgit v1.2.3