clang-tidy suggested change.

This commit is contained in:
cptskippy 2024-05-31 23:30:26 +00:00
parent 289fa6ce18
commit 863c0b576a
2 changed files with 2 additions and 2 deletions

View file

@ -446,7 +446,7 @@ const char *LD2415HComponent::negotiation_mode_to_s_(NegotiationMode value) {
} }
} }
const char *i_to_s_(const std::map<std::string, uint8_t> &map, uint8_t i) { const char *i_to_s(const std::map<std::string, uint8_t> &map, uint8_t i) {
for (const auto &pair : map) { for (const auto &pair : map) {
if (pair.second == i) { if (pair.second == i) {
return pair.first.c_str(); return pair.first.c_str();

View file

@ -134,7 +134,7 @@ class LD2415HComponent : public Component, public uart::UARTDevice {
const char *tracking_mode_to_s_(TrackingMode value); const char *tracking_mode_to_s_(TrackingMode value);
const char *unit_of_measure_to_s_(UnitOfMeasure value); const char *unit_of_measure_to_s_(UnitOfMeasure value);
const char *negotiation_mode_to_s_(NegotiationMode value); const char *negotiation_mode_to_s_(NegotiationMode value);
const char *i_to_s_(const std::map<std::string, uint8_t> &map, uint8_t i); const char *i_to_s(const std::map<std::string, uint8_t> &map, uint8_t i);
std::vector<LD2415HListener *> listeners_{}; std::vector<LD2415HListener *> listeners_{};
}; };