Skip to content

Commit

Permalink
Tidy.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Dec 4, 2019
1 parent 83b9106 commit cbd7efa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/cpp/common/test_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TEST(IO, FileExtension) {
TEST(IO, FixedSizeStream) {
std::string buffer {"This is the content of stream"};
{
MemoryFixSizeBuffer stream((void *)buffer.c_str(), buffer.size());
MemoryFixSizeBuffer stream(static_cast<void *>(&buffer[0]), buffer.size());
PeekableInStream peekable(&stream);
FixedSizeStream fixed(&peekable);

Expand All @@ -30,7 +30,7 @@ TEST(IO, FixedSizeStream) {
huge_buffer += buffer;
}

MemoryFixSizeBuffer stream((void *)huge_buffer.c_str(), huge_buffer.size());
MemoryFixSizeBuffer stream(static_cast<void*>(&huge_buffer[0]), huge_buffer.size());
PeekableInStream peekable(&stream);
FixedSizeStream fixed(&peekable);

Expand All @@ -39,5 +39,5 @@ TEST(IO, FixedSizeStream) {
ASSERT_EQ(huge_buffer, out_buffer);
}
}
}
} // namespace common
} // namespace xgboost

0 comments on commit cbd7efa

Please sign in to comment.