Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Pointer to const.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 4 Feb 2021 13:20:49 +0000 (14:20 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 4 Feb 2021 20:23:16 +0000 (21:23 +0100)
include/simgrid/plugins/file_system.h
src/plugins/file_system/s4u_FileSystem.cpp

index 5880037..dbb6d54 100644 (file)
@@ -103,7 +103,7 @@ class XBT_PUBLIC File : public xbt::Extendable<File> {
 
 public:
   File(const std::string& fullpath, void* userdata);
-  File(const std::string& fullpath, sg_host_t host, void* userdata);
+  File(const std::string& fullpath, const_sg_host_t host, void* userdata);
   File(const File&) = delete;
   File& operator=(const File&) = delete;
   ~File();
index 914c09d..b29dd66 100644 (file)
@@ -67,7 +67,7 @@ Disk* File::find_local_disk_on(const Host* host)
 
 File::File(const std::string& fullpath, void* userdata) : File(fullpath, Host::current(), userdata) {}
 
-File::File(const std::string& fullpath, sg_host_t host, void* userdata) : fullpath_(fullpath)
+File::File(const std::string& fullpath, const_sg_host_t host, void* userdata) : fullpath_(fullpath)
 {
   kernel::actor::simcall([this, &host, userdata] {
     this->set_data(userdata);