Skip to content
Snippets Groups Projects
Commit 4715b65f authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #28334: test: use vector<char> where contiguous character buffer access is assumed

parent dd96fce5
No related branches found
No related tags found
No related merge requests found
...@@ -80,12 +80,12 @@ void run_client() ...@@ -80,12 +80,12 @@ void run_client()
return; return;
// initialize destination string to 0's // initialize destination string to 0's
std::string dest(sizeof(test_data), 0); std::vector<char> dest(sizeof(test_data), 0);
const std::string test_data_str(test_data, sizeof(test_data)); const std::vector<char> test_data_str(test_data, test_data + sizeof(test_data));
assert(test_data_str.size() == 27); assert(test_data_str.size() == 27);
assert(dest.size() == test_data_str.size()); assert(dest.size() == test_data_str.size());
while (not done and dest != test_data_str) { while (not done and dest != test_data_str) {
src.render(&(*dest.begin()), dest.size()); src.render(dest.data(), dest.size());
usleep(1000); usleep(1000);
} }
src.stop(); src.stop();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment