mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 08:08:50 +00:00
Minor clean up
This commit is contained in:
+3
-2
@@ -6961,7 +6961,9 @@ struct TypeAndToken {
|
|||||||
Token token;
|
Token token;
|
||||||
};
|
};
|
||||||
|
|
||||||
void add_constant_switch_case(CheckerContext *ctx, PtrMap<uintptr, TypeAndToken> *seen, Operand operand, bool use_expr = true) {
|
typedef PtrMap<uintptr, TypeAndToken> SeenMap;
|
||||||
|
|
||||||
|
void add_constant_switch_case(CheckerContext *ctx, SeenMap *seen, Operand operand, bool use_expr = true) {
|
||||||
if (operand.mode != Addressing_Constant) {
|
if (operand.mode != Addressing_Constant) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -7002,7 +7004,6 @@ void add_constant_switch_case(CheckerContext *ctx, PtrMap<uintptr, TypeAndToken>
|
|||||||
multi_map_insert(seen, key, tap);
|
multi_map_insert(seen, key, tap);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef PtrMap<uintptr, TypeAndToken> SeenMap;
|
|
||||||
|
|
||||||
void add_to_seen_map(CheckerContext *ctx, SeenMap *seen, TokenKind upper_op, Operand const &x, Operand const &lhs, Operand const &rhs) {
|
void add_to_seen_map(CheckerContext *ctx, SeenMap *seen, TokenKind upper_op, Operand const &x, Operand const &lhs, Operand const &rhs) {
|
||||||
if (is_type_enum(x.type)) {
|
if (is_type_enum(x.type)) {
|
||||||
|
|||||||
+1
-1
@@ -921,7 +921,7 @@ void check_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PtrMap<uintptr, TypeAndToken> seen = {}; // NOTE(bill): Multimap, Key: ExactValue
|
SeenMap seen = {}; // NOTE(bill): Multimap, Key: ExactValue
|
||||||
map_init(&seen, heap_allocator());
|
map_init(&seen, heap_allocator());
|
||||||
defer (map_destroy(&seen));
|
defer (map_destroy(&seen));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user