Skip to content

Commit

Permalink
Use C++ style casts in C++ code.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Sep 14, 2018
1 parent 0688877 commit 7821cd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion toxav/rtp_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion toxcore/mono_time_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7821cd8

Please sign in to comment.