Fix usages of std::min and std::max to be windows safe (#4887)

This commit is contained in:
Thad House
2022-12-31 12:00:45 -08:00
committed by GitHub
parent c11bd2720f
commit b632b288a3
6 changed files with 9 additions and 9 deletions

View File

@@ -193,7 +193,7 @@ bool ADIS16470_IMU::SwitchToStandardSPI() {
while (data_count > 0) {
/* Receive data, max of 200 words at a time (prevent potential segfault)
*/
m_spi->ReadAutoReceivedData(trashBuffer, std::min(data_count, 200),
m_spi->ReadAutoReceivedData(trashBuffer, (std::min)(data_count, 200),
0_s);
/*Get the remaining data count */
data_count = m_spi->ReadAutoReceivedData(trashBuffer, 0, 0_s);