[api] Use this-> for member access in inline methods

This commit is contained in:
J. Nick Koston
2026-04-01 09:57:29 -10:00
parent b236d09734
commit 6d18422216
+5 -5
View File
@@ -651,19 +651,19 @@ class APIConnection final : public APIServerConnectionBase {
if (message_type != EventResponse::MESSAGE_TYPE)
#endif
{
for (const auto &item : items) {
for (const auto &item : this->items) {
if (item.entity == entity && item.message_type == message_type)
return; // Already queued
}
}
items.push_back({entity, message_type, estimated_size, aux_data_index});
this->items.push_back({entity, message_type, estimated_size, aux_data_index});
}
// Add item to the front of the batch (for high priority messages like ping)
void add_item_front(EntityBase *entity, uint8_t message_type, uint8_t estimated_size) {
// Swap to front avoids expensive vector::insert which shifts all elements
items.push_back({entity, message_type, estimated_size, AUX_DATA_UNUSED});
if (items.size() > 1) {
std::swap(items.front(), items.back());
this->items.push_back({entity, message_type, estimated_size, AUX_DATA_UNUSED});
if (this->items.size() > 1) {
std::swap(this->items.front(), this->items.back());
}
}