diff --git a/Sming/Components/FlashString b/Sming/Components/FlashString index c7f2b606c1..a44b584a10 160000 --- a/Sming/Components/FlashString +++ b/Sming/Components/FlashString @@ -1 +1 @@ -Subproject commit c7f2b606c121d757a385b17faa50b7b7367d223a +Subproject commit a44b584a100848fdb89cc6ea5f1778b4557d3227 diff --git a/Sming/Components/IFS b/Sming/Components/IFS index 4db9a92b7e..4d30df4bf9 160000 --- a/Sming/Components/IFS +++ b/Sming/Components/IFS @@ -1 +1 @@ -Subproject commit 4db9a92b7e893a0406f1c29ca30072adb676e753 +Subproject commit 4d30df4bf9e2bb155009595381d0822bdd81dbfa diff --git a/Sming/Core/FileSystem.h b/Sming/Core/FileSystem.h index 211813000f..c2682fc4f2 100644 --- a/Sming/Core/FileSystem.h +++ b/Sming/Core/FileSystem.h @@ -235,7 +235,8 @@ template inline int fileSetContent(const TFileName& fileNam return fileSystem->setContent(fileName, content, length); } -template inline int fileSetContent(const TFileName& fileName, TContent content) +template +inline int fileSetContent(const TFileName& fileName, const TContent& content) { CHECK_FS(setContent) return fileSystem->setContent(fileName, content); diff --git a/docs/source/upgrading/5.1-5.2.rst b/docs/source/upgrading/5.1-5.2.rst index 0d10a27c14..96f7fc41a4 100644 --- a/docs/source/upgrading/5.1-5.2.rst +++ b/docs/source/upgrading/5.1-5.2.rst @@ -75,3 +75,19 @@ Applications must explicitly call :cpp:func:`HttpRequest::onSslInit` and set the This extra step ensures that security checks are not unintentionally bypassed. The same behaviour is now presented when using Bearssl, and will now fail with ``X509_NOT_TRUSTED``. + + +**FlashString copy support removed** + +The :library:`FlashString` previously supported copies (references) like this:: + + FlashString emptyString; + FlashString stringCopy(FS("Inline string")); + + DEFINE_FSTR_DATA_LOCAL(flashHelloData, "Hello"); + auto myCopy = flashHelloData; + +These will now fail to compile. +Copy construction and assignment has been explicitly deleted so avoid unintentional side-effects. + +Objects should always be passed by reference.