Use C++ style casts in C++ code.

This commit is contained in:
iphydf 2018-09-13 22:32:06 +00:00
parent 0688877fba
commit 7821cd8412
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ TEST(Rtp, SerialisingAllOnes) {
uint8_t rdata[RTP_HEADER_SIZE];
rtp_header_pack(rdata, &header);
EXPECT_EQ(std::string((char const *)rdata, sizeof rdata),
EXPECT_EQ(std::string(reinterpret_cast<char const *>(rdata), sizeof rdata),
std::string("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"

View File

@ -36,7 +36,7 @@ TEST(MonoTime, IsTimeout) {
}
uint64_t test_current_time_callback(Mono_Time *mono_time, void *user_data) {
return *(uint64_t *)user_data;
return *static_cast<uint64_t *>(user_data);
}
TEST(MonoTime, CustomTime) {