Skip to content

Commit 4482cdd

Browse files
committed
[Sonar] Make sure that moving an object of class FileSystem is noexcept
1 parent f6f579d commit 4482cdd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

include/fsmod/FileSystem.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ namespace simgrid::fsmod {
3939
int max_num_open_files_;
4040

4141
public:
42-
explicit FileSystem(std::string name, int max_num_open_files) : name_(std::move(name)), max_num_open_files_(max_num_open_files) {};
43-
42+
explicit FileSystem(std::string name, int max_num_open_files)
43+
: name_(std::move(name)), max_num_open_files_(max_num_open_files) {};
44+
/// \cond EXCLUDE_FROM_DOCUMENTATION
45+
~FileSystem() noexcept = default;
46+
FileSystem(const FileSystem& other) noexcept = default;
47+
FileSystem& operator=(const FileSystem& other) noexcept = default;
48+
/// \endcond
4449

4550
static std::shared_ptr<FileSystem> create(const std::string &name, int max_num_open_files = 1024);
4651
static const std::map<std::string, std::shared_ptr<FileSystem>, std::less<>>&

0 commit comments

Comments
 (0)