Skip to content

Commit

Permalink
refactor: suppress clang-tidy int-to-ptr warning
Browse files Browse the repository at this point in the history
This warning is caused by casting data->threadpool from uintptr_t to
mjThreadPool. Since the type of data->threadpool depends on mujoco, we
can only suppress the warning and not fix it.
  • Loading branch information
DavidPL1 committed Nov 8, 2024
1 parent 995b5db commit 89bf950
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mujoco_ros_laser/src/laser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ void LaserPlugin::computeLasersMultithreaded(const mjModel *model, mjData *data)
tasks[i].func = processRayThreaded;
tasks[i].args = &ray_args[i];

mju_threadPoolEnqueue(reinterpret_cast<mjThreadPool *>(data->threadpool), &tasks[i]);
mju_threadPoolEnqueue(reinterpret_cast<mjThreadPool *>(data->threadpool),
&tasks[i]); // NOLINT(performance-no-int-to-ptr)
}

for (uint i = 0; i < laser_config.nrays; ++i) {
Expand Down

0 comments on commit 89bf950

Please sign in to comment.