Skip to content

Commit 0246f33

Browse files
[BinaryFromat] Simplify subscript operators (NFC) (#167170)
Identified with readability-simplify-subscript-expr.
1 parent 7b1a74c commit 0246f33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/unittests/BinaryFormat/MsgPackWriterTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ TEST_F(MsgPackWriter, TestWriteFixPositiveInt) {
4040
MPWriter.write(u);
4141
std::string Output = OStream.str();
4242
EXPECT_EQ(Output.size(), 1u);
43-
EXPECT_EQ(Output.data()[0], static_cast<uint8_t>(u));
43+
EXPECT_EQ(Output[0], static_cast<uint8_t>(u));
4444
}
4545
}
4646

@@ -128,7 +128,7 @@ TEST_F(MsgPackWriter, TestWriteFixNegativeInt) {
128128
MPWriter.write(i);
129129
std::string Output = OStream.str();
130130
EXPECT_EQ(Output.size(), 1u);
131-
EXPECT_EQ(static_cast<int8_t>(Output.data()[0]), static_cast<int8_t>(i));
131+
EXPECT_EQ(static_cast<int8_t>(Output[0]), static_cast<int8_t>(i));
132132
}
133133
}
134134

0 commit comments

Comments
 (0)