mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Improve r172464: const_cast is not needed if the variable is not const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
398db9368d
commit
31659fa066
@ -44,10 +44,9 @@ TEST(WaymarkTest, TwoBit) {
|
||||
Use* many = (Use*)calloc(sizeof(Use), 8212 + 1);
|
||||
ASSERT_TRUE(many);
|
||||
Use::initTags(many, many + 8212);
|
||||
for (const Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U)
|
||||
for (Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U)
|
||||
{
|
||||
EXPECT_EQ(reinterpret_cast<User*>(const_cast<Use *>(Ue + 1)),
|
||||
U->getUser());
|
||||
EXPECT_EQ(reinterpret_cast<User *>(Ue + 1), U->getUser());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user