Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Install some kernel header files for the users' plugins and more
[simgrid.git] / src / kernel / resource / Resource.cpp
index 6016ae4..ef78365 100644 (file)
@@ -3,7 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "src/kernel/resource/Resource.hpp"
+#include "simgrid/kernel/resource/Resource.hpp"
 #include "src/kernel/lmm/maxmin.hpp" // Constraint
 #include "src/surf/surf_interface.hpp"
 
@@ -11,7 +11,7 @@ namespace simgrid {
 namespace kernel {
 namespace resource {
 
-Resource::Resource(surf::Model* model, const std::string& name, lmm::Constraint* constraint)
+Resource::Resource(Model* model, const std::string& name, lmm::Constraint* constraint)
     : name_(name), model_(model), constraint_(constraint)
 {
 }
@@ -42,7 +42,7 @@ double Resource::getLoad()
   return constraint_->get_usage();
 }
 
-surf::Model* Resource::model() const
+Model* Resource::model() const
 {
   return model_;
 }
@@ -64,7 +64,7 @@ bool Resource::operator==(const Resource& other) const
 
 kernel::lmm::Constraint* Resource::constraint() const
 {
-  return const_cast<kernel::lmm::Constraint*>(constraint_);
+  return constraint_;
 }
 
 } // namespace resource