From: Arnaud Giersch Date: Thu, 4 Feb 2021 13:20:49 +0000 (+0100) Subject: [sonar] Pointer to const. X-Git-Tag: v3.27~442 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/404c5d56e441fda9f4f266e49c09871ae4e03963 [sonar] Pointer to const. --- diff --git a/include/simgrid/plugins/file_system.h b/include/simgrid/plugins/file_system.h index 5880037009..dbb6d54cbb 100644 --- a/include/simgrid/plugins/file_system.h +++ b/include/simgrid/plugins/file_system.h @@ -103,7 +103,7 @@ class XBT_PUBLIC File : public xbt::Extendable { 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(); diff --git a/src/plugins/file_system/s4u_FileSystem.cpp b/src/plugins/file_system/s4u_FileSystem.cpp index 914c09dc0f..b29dd66d3d 100644 --- a/src/plugins/file_system/s4u_FileSystem.cpp +++ b/src/plugins/file_system/s4u_FileSystem.cpp @@ -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);