Skip to content

Commit 8b21b8c

Browse files
committed
Compiler: remove last cpp style cast
* also remove redundant `(void*)` cast
1 parent 23b1f71 commit 8b21b8c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ir/constant_list.c2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn u32 ConstantList.add(ConstantList* l, const Constant* c) {
4646
if (l.count >= l.capacity) {
4747
l.capacity *= 2;
4848
void* constants2 = stdlib.malloc(l.capacity * sizeof(Constant));
49-
void* old = (void*)l.constants;
49+
void* old = l.constants;
5050
if (old) {
5151
memcpy(constants2, old, l.count * sizeof(Constant));
5252
stdlib.free(old);

parser/token.c2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,5 +323,5 @@ public fn void Token.init(Token* tok) {
323323
}
324324

325325
public fn Radix Token.getRadix(const Token* tok) {
326-
return cast<Radix>(tok.radix);
326+
return (Radix)tok.radix;
327327
}

0 commit comments

Comments
 (0)