Fixe type errors.

This commit is contained in:
Michael Müller
2022-07-04 16:25:50 +02:00
parent 55f07a89c6
commit 48cbe050f7

View File

@@ -37,10 +37,10 @@ int main(void) {
std::vector<Posix_playground::Chrono_thread*> thread_objs(4);
std::vector<std::unique_ptr<std::thread>> thread_list(4);
for (int i = 0; i < 4; i++) {
Posix_playground::Chrono_thread thread_objs[i] = new Posix_playground::Chrono_thread(i);
for (std::uint16_t i = 0; i < 4; i++) {
thread_objs[i] = new Posix_playground::Chrono_thread(i);
auto thread = std::make_unique<std::thread>([&]
{ thread_objs[i].execute(); });
{ thread_objs[i]->execute(); });
thread_list.push_back(thread);
thread->join();
}