+2
-14
lines changedFilter options
+2
-14
lines changed Original file line number Diff line number Diff line change
@@ -102,14 +102,13 @@ UPB_INLINE void _upb_map_fromvalue(upb_value val, void* out, size_t size) {
102
102
}
103
103
}
104
104
105
-
UPB_INLINE void* _upb_map_next(const struct upb_Map* map, size_t* iter) {
105
+
UPB_INLINE bool _upb_map_next(const struct upb_Map* map, size_t* iter) {
106
106
upb_strtable_iter it;
107
107
it.t = &map->t.strtable;
108
108
it.index = *iter;
109
109
upb_strtable_next(&it);
110
110
*iter = it.index;
111
-
if (upb_strtable_done(&it)) return NULL;
112
-
return (void*)str_tabent(&it);
111
+
return !upb_strtable_done(&it);
113
112
}
114
113
115
114
UPB_INLINE void _upb_Map_Clear(struct upb_Map* map) {
Original file line number Diff line number Diff line change
@@ -676,17 +676,6 @@ void GenerateMapSetters(upb::FieldDefPtr field, const DefPoolPair& pools,
676
676
)cc",
677
677
msg_name, resolved_name, MapKeyCType(field),
678
678
FieldInitializer(pools, field, options), MapKeySize(field, "key"));
679
-
output(
680
-
R"cc(
681
-
UPB_INLINE $0 $1_$2_nextmutable($1* msg, size_t* iter) {
682
-
const upb_MiniTableField field = $3;
683
-
upb_Map* map = (upb_Map*)upb_Message_GetMap(UPB_UPCAST(msg), &field);
684
-
if (!map) return NULL;
685
-
return ($0)_upb_map_next(map, iter);
686
-
}
687
-
)cc",
688
-
CType(field), msg_name, resolved_name,
689
-
FieldInitializerStrong(pools, field, options));
690
679
}
691
680
692
681
void GenerateRepeatedSetters(upb::FieldDefPtr field, const DefPoolPair& pools,
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4