]> AND Public Git Repository - simgrid.git/blobdiff - include/simgrid/s4u/Semaphore.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] bunch of const
[simgrid.git] / include / simgrid / s4u / Semaphore.hpp
index b100ba560dc500fa62cbd45a97f531ea9c14cf62..d3e2c58d5b9ad6ab805b6e8f2ae2281c8f215856 100644 (file)
@@ -7,7 +7,6 @@
 #define SIMGRID_S4U_SEMAPHORE_HPP
 
 #include <simgrid/forward.h>
-#include <simgrid/simix.h>
 
 namespace simgrid {
 namespace s4u {
@@ -29,7 +28,10 @@ namespace s4u {
  *
  */
 class XBT_PUBLIC Semaphore {
+#ifndef DOXYGEN
   friend kernel::activity::SemaphoreImpl;
+  friend void kernel::activity::intrusive_ptr_release(kernel::activity::SemaphoreImpl* sem);
+#endif
 
   kernel::activity::SemaphoreImpl* const pimpl_;
 
@@ -37,6 +39,7 @@ class XBT_PUBLIC Semaphore {
   friend void intrusive_ptr_release(const Semaphore* sem);
 
   explicit Semaphore(kernel::activity::SemaphoreImpl* sem) : pimpl_(sem) {}
+  ~Semaphore() = default;
 #ifndef DOXYGEN
   Semaphore(Semaphore const&) = delete;            // No copy constructor. Use SemaphorePtr instead
   Semaphore& operator=(Semaphore const&) = delete; // No direct assignment either. Use SemaphorePtr instead