Skip to content

Commit

Permalink
fileSetContent passing copy of content, should be reference
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Jun 10, 2024
1 parent 8282182 commit 50b080b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sming/Core/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ template <typename TFileName> inline int fileSetContent(const TFileName& fileNam
return fileSystem->setContent(fileName, content, length);
}

template <typename TFileName, typename TContent> inline int fileSetContent(const TFileName& fileName, TContent content)
template <typename TFileName, typename TContent>
inline int fileSetContent(const TFileName& fileName, const TContent& content)
{
CHECK_FS(setContent)
return fileSystem->setContent(fileName, content);
Expand Down

0 comments on commit 50b080b

Please sign in to comment.