From 05fa5921e6f104d00752e2c05ad11383cd471852 Mon Sep 17 00:00:00 2001 From: fumiama Date: Tue, 18 May 2021 12:40:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protobuf.c | 9 --------- simple_protobuf.h | 1 - 2 files changed, 10 deletions(-) diff --git a/protobuf.c b/protobuf.c index e96bc78..df89284 100644 --- a/protobuf.c +++ b/protobuf.c @@ -81,15 +81,6 @@ int set_pb(FILE* fp, uint64_t* items_len, uint64_t struct_len, void* target) { return i; } -uint8_t first_set(uint64_t n) { - uint8_t i = 0; - while(!(n & 1)) { - n >>= 1; - i++; - } - return i; -} - //uint64_t struct_size, uint32_t items_cnt, void* item_addr1, void* item_addr2... uint64_t* align_struct(uint64_t struct_size, uint32_t items_cnt, ...) { va_list list; diff --git a/simple_protobuf.h b/simple_protobuf.h index 15111e0..12d3044 100644 --- a/simple_protobuf.h +++ b/simple_protobuf.h @@ -11,7 +11,6 @@ typedef struct SIMPLE_PB SIMPLE_PB; SIMPLE_PB* get_pb(FILE* fp); int set_pb(FILE* fp, uint64_t* items_len, uint64_t struct_len, void* target); -uint8_t first_set(uint64_t n); //uint64_t struct_size, uint32_t items_cnt, void* item_addr1, void* item_addr2... uint64_t* align_struct(uint64_t struct_size, uint32_t items_cnt, ...);