From d34a6901369cb424ab8e460b3426f5633ff1a9ac Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 11 Jan 2021 18:59:14 +0800 Subject: [PATCH] ublox_msg.h: remove #define min (#19718) --- selfdrive/locationd/ublox_msg.cc | 2 +- selfdrive/locationd/ublox_msg.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/selfdrive/locationd/ublox_msg.cc b/selfdrive/locationd/ublox_msg.cc index 596bbaf800..4203085b3b 100644 --- a/selfdrive/locationd/ublox_msg.cc +++ b/selfdrive/locationd/ublox_msg.cc @@ -338,7 +338,7 @@ kj::Array UbloxMsgParser::gen_mon_hw() { bool UbloxMsgParser::add_data(const uint8_t *incoming_data, uint32_t incoming_data_len, size_t &bytes_consumed) { int needed = needed_bytes(); if(needed > 0) { - bytes_consumed = min((size_t)needed, incoming_data_len ); + bytes_consumed = std::min((uint32_t)needed, incoming_data_len ); // Add data to buffer memcpy(msg_parse_buf + bytes_in_parse_buf, incoming_data, bytes_consumed); bytes_in_parse_buf += bytes_consumed; diff --git a/selfdrive/locationd/ublox_msg.h b/selfdrive/locationd/ublox_msg.h index 63eaaab87f..5fda805402 100644 --- a/selfdrive/locationd/ublox_msg.h +++ b/selfdrive/locationd/ublox_msg.h @@ -3,8 +3,6 @@ #include #include "messaging.hpp" -#define min(x, y) ((x) <= (y) ? (x) : (y)) - // NAV_PVT typedef struct __attribute__((packed)) { uint32_t iTOW;