Skip to content

Commit

Permalink
Force inline ZeroTerminatedRamString::size()
Browse files Browse the repository at this point in the history
Resolves #1990
  • Loading branch information
bblanchon committed Nov 6, 2023
1 parent 49e2a8d commit 7517ecb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ArduinoJson/Strings/Adapters/RamString.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <string.h> // strcmp

#include <ArduinoJson/Polyfills/assert.hpp>
#include <ArduinoJson/Polyfills/attributes.hpp>
#include <ArduinoJson/Strings/StoragePolicy.hpp>
#include <ArduinoJson/Strings/StringAdapter.hpp>

Expand All @@ -27,7 +28,7 @@ class ZeroTerminatedRamString {
return !str_;
}

size_t size() const {
FORCE_INLINE size_t size() const {
return str_ ? ::strlen(str_) : 0;
}

Expand Down

0 comments on commit 7517ecb

Please sign in to comment.