Add internal utility for zeroing int vectors.
Remove unnecessary branches in related functions. PiperOrigin-RevId: 562768873 Change-Id: I3964a7a953d95bcd4e29137a7b590be5ffa6e311
This commit is contained in:
committed by
Copybara-Service
parent
f976d6d228
commit
d5292976de
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <mujoco/mjdata.h>
|
||||
#include <mujoco/mjmacro.h>
|
||||
@@ -76,7 +75,7 @@ int mj_floodFill(int* island, int nr, const int* rownnz, const int* rowadr, cons
|
||||
island[v] = nisland;
|
||||
|
||||
// push adjacent vertices onto stack
|
||||
memcpy(stack + nstack, colind + rowadr[v], rownnz[v]*sizeof(int));
|
||||
mju_copyInt(stack + nstack, colind + rowadr[v], rownnz[v]);
|
||||
nstack += rownnz[v];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user