mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpiutil] jni_util: Add JSpan and CriticalJSpan (#5554)
These replace JArrayRef et al and support statically sized arrays similar to std::span.
This commit is contained in:
@@ -269,7 +269,7 @@ JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_simulation_AddressableLEDDataJNI_setData
|
||||
(JNIEnv* env, jclass, jint index, jbyteArray arr)
|
||||
{
|
||||
JByteArrayRef jArrRef{env, arr};
|
||||
JSpan<const jbyte> jArrRef{env, arr};
|
||||
auto arrRef = jArrRef.array();
|
||||
HALSIM_SetAddressableLEDData(
|
||||
index, reinterpret_cast<const HAL_AddressableLEDData*>(arrRef.data()),
|
||||
|
||||
Reference in New Issue
Block a user