Skip to content

Commit c448548

Browse files
committed
fix sonar issues
1 parent 5c7716e commit c448548

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

include/fsmod/Partition.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace simgrid::fsmod {
5656
protected:
5757
friend class FileSystem;
5858
// Methods to perform caching
59-
void make_file_evictable(const std::string &dir_path, const std::string &file_name, bool evictable);
59+
void make_file_evictable(const std::string &dir_path, const std::string &file_name, bool evictable) const;
6060
virtual void create_space(sg_size_t num_bytes);
6161
virtual void new_file_creation_event(FileMetadata *file_metadata);
6262
virtual void new_file_access_event(FileMetadata *file_metadata);

include/fsmod/PartitionFIFOCaching.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ namespace simgrid::fsmod {
4141
private:
4242
unsigned long sequence_number_ = 0;
4343
std::map<unsigned long, FileMetadata*> priority_list_;
44-
// void print_priority_list();
4544
};
4645

4746
/** \endcond */

src/Partition.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace simgrid::fsmod {
6868
}
6969
return to_return;
7070
}
71-
71+
7272
/**
7373
* @brief Retrieve the metadata for a file
7474
* @param dir_path: the path to the directory in which the file is located
@@ -223,7 +223,8 @@ namespace simgrid::fsmod {
223223
this->increase_free_space(num_bytes);
224224
}
225225

226-
void Partition::make_file_evictable(const std::string &dir_path, const std::string &file_name, bool evictable) {
226+
void Partition::make_file_evictable(const std::string &dir_path, const std::string &file_name,
227+
bool evictable) const {
227228
auto metadata = this->get_file_metadata(dir_path, file_name);
228229
if (not metadata) {
229230
throw FileNotFoundException(XBT_THROW_POINT, dir_path + "/" + file_name);

src/PartitionFIFOCaching.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ namespace simgrid::fsmod {
3838
}
3939
}
4040

41-
// void PartitionFIFOCaching::print_priority_list() {
42-
// std::cerr << "PLIST " << this->get_name() << " = ";
43-
// for (auto const &i : priority_list_) {
44-
// std::cerr << " " << i.second->file_name_ << " ";
45-
// }
46-
// std::cerr << "\n";
47-
// }
48-
4941
void PartitionFIFOCaching::new_file_creation_event(FileMetadata *file_metadata) {
5042
file_metadata->sequence_number_ = sequence_number_++;
5143
priority_list_[file_metadata->sequence_number_] = file_metadata;

0 commit comments

Comments
 (0)