Browse Source

Fix SonarLint findings in StorableFile class

Patrick-Christopher Mattulat 11 months ago
parent
commit
11e05db5b7
2 changed files with 4 additions and 4 deletions
  1. 2 2
      include/ls-std/io/StorableFile.hpp
  2. 2 2
      source/ls-std/io/StorableFile.cpp

+ 2 - 2
include/ls-std/io/StorableFile.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -25,7 +25,7 @@ namespace ls::std::io
       explicit StorableFile(const ::std::string &_path);
       ~StorableFile() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::File> getFile();
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::File> getFile() const;
       [[nodiscard]] ls::std::core::type::byte_field load() override;
       void reset(const ::std::string &_path);
       void save(const ls::std::core::type::byte_field &_data) override;

+ 2 - 2
source/ls-std/io/StorableFile.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2023-02-23
+ * Changed:         2023-05-19
  *
  * */
 
@@ -27,7 +27,7 @@ StorableFile::StorableFile(const string &_path)
 
 StorableFile::~StorableFile() noexcept = default;
 
-shared_ptr<File> StorableFile::getFile()
+shared_ptr<File> StorableFile::getFile() const
 {
   return this->file;
 }