hsaturn / TinyMqtt

ESP 8266 / 32 / WROOM Small footprint Mqtt Broker and Client
GNU General Public License v3.0
198 stars 41 forks source link

Platformio fixes #64

Closed hsaturn closed 1 year ago

hsaturn commented 1 year ago

Check that examples under platformio compile and run.

The Arduino IDE compile options allows things that are not allowed under platformio. I have to refactor a little in order to make the compilation successful

tv4you2016 commented 1 year ago

image

tv4you2016 commented 1 year ago

Fix:

TinyString& TinyString::operator=(TinyString && other)
{
  if (this == &other) return *this;
  clear();

  //str = std::exchange(other.str, str);
  //size_ = std::exchange(other.size_, size_);
  //free_ = std::exchange(other.free_, free_);
  using std::swap;
  swap(other.str, str);
  swap(other.size_, size_);
  swap(other.free_, free_);

  return *this;
}
hsaturn commented 1 year ago

Ouch..... Thanks. Tiny string is not used yet because of this kind of bug. Thanks