mirror of
https://github.com/esphome/esphome.git
synced 2025-10-12 23:03:46 +01:00
just remove it
This commit is contained in:
@@ -62,7 +62,7 @@ class MDNSComponent : public Component {
|
||||
/// Add a dynamic TXT value and return pointer to it for use in MDNSTXTRecord
|
||||
const char *add_dynamic_txt_value(const std::string &value) {
|
||||
this->dynamic_txt_values_.push_back(value);
|
||||
return this->dynamic_txt_values_.back().c_str();
|
||||
return this->dynamic_txt_values_[this->dynamic_txt_values_.size() - 1].c_str();
|
||||
}
|
||||
|
||||
/// Storage for runtime-generated TXT values (MAC address, user lambdas)
|
||||
|
@@ -146,15 +146,6 @@ template<typename T, size_t N> class StaticVector {
|
||||
T &operator[](size_t i) { return data_[i]; }
|
||||
const T &operator[](size_t i) const { return data_[i]; }
|
||||
|
||||
T &back() {
|
||||
assert(count_ > 0 && "back() called on empty StaticVector");
|
||||
return data_[count_ - 1];
|
||||
}
|
||||
const T &back() const {
|
||||
assert(count_ > 0 && "back() called on empty StaticVector");
|
||||
return data_[count_ - 1];
|
||||
}
|
||||
|
||||
// For range-based for loops
|
||||
iterator begin() { return data_.begin(); }
|
||||
iterator end() { return data_.begin() + count_; }
|
||||
|
Reference in New Issue
Block a user