Skip to content

Commit c2276d1

Browse files
authored
Merge pull request #11842 from dcci/warns
[SILValue] Prefer const_cast<> to C-style cast.
2 parents e8de696 + d98a158 commit c2276d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/SIL/SILValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class SILValue {
260260

261261
public:
262262
SILValue(const ValueBase *V = nullptr)
263-
: Value((ValueBase *)V) { }
263+
: Value(const_cast<ValueBase *>(V)) { }
264264

265265
ValueBase *operator->() const { return Value; }
266266
ValueBase &operator*() const { return *Value; }

0 commit comments

Comments
 (0)