Skip to content

Commit

Permalink
Make openFileStream a const method (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
rh101 committed Dec 13, 2023
1 parent ae51e26 commit 2b01fa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/platform/FileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ void FileUtils::listFilesRecursivelyAsync(std::string_view dirPath,
std::move(callback));
}

std::unique_ptr<IFileStream> FileUtils::openFileStream(std::string_view filePath, IFileStream::Mode mode)
std::unique_ptr<IFileStream> FileUtils::openFileStream(std::string_view filePath, IFileStream::Mode mode) const
{
FileStream fs;
return fs.open(filePath, mode) ? std::make_unique<FileStream>(std::move(fs)) : nullptr;
Expand Down
2 changes: 1 addition & 1 deletion core/platform/FileUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ class AX_DLL FileUtils
* @param mode The mode to open the file in, being READ | WRITE | APPEND
* @return Returns a pointer to the file stream
*/
virtual std::unique_ptr<IFileStream> openFileStream(std::string_view filePath, IFileStream::Mode mode);
virtual std::unique_ptr<IFileStream> openFileStream(std::string_view filePath, IFileStream::Mode mode) const;

protected:
/**
Expand Down

0 comments on commit 2b01fa2

Please sign in to comment.