Skip to content

Commit

Permalink
tiny tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed May 24, 2024
1 parent d37877a commit 49ce0d7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/fsmod/FileMetadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace simgrid::fsmod {
std::unordered_map<int, sg_size_t> ongoing_writes_;
unsigned file_refcount_ = 0;

unsigned long sequence_number_; // Used for caching algorithms
unsigned long sequence_number_= 0; // Used for caching algorithms

public:
FileMetadata(sg_size_t initial_size, Partition *partition, std::string dir_path, std::string file_name);
Expand Down
2 changes: 1 addition & 1 deletion include/fsmod/FileSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace simgrid::fsmod {
[[nodiscard]] sg_size_t file_size(const std::string& full_path) const;

std::shared_ptr<File> open(const std::string& full_path, const std::string& access_mode);
void close(std::shared_ptr<File> f);
void close(const std::shared_ptr<File> &f);

[[nodiscard]] std::shared_ptr<Partition> partition_by_name(const std::string& name) const;
[[nodiscard]] std::shared_ptr<Partition> partition_by_name_or_null(const std::string& name) const;
Expand Down
2 changes: 1 addition & 1 deletion src/FileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ namespace simgrid::fsmod {
* behavior.
* @param file a shared pointer on a File
*/
void FileSystem::close(std::shared_ptr<File> file) {
void FileSystem::close(const std::shared_ptr<File> &file) {
this->num_open_files_--;
file->metadata_->decrease_file_refcount();
}
Expand Down
1 change: 0 additions & 1 deletion src/PartitionFIFOCaching.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <memory>
#include <simgrid/Exception.hpp>

#include "fsmod/PartitionFIFOCaching.hpp"
Expand Down

0 comments on commit 49ce0d7

Please sign in to comment.