THROWF(unknown_error, 0, "The Impossible Did Happen (yet again)")
#define THROW_UNIMPLEMENTED \
THROWF(unknown_error, 0, "Function %s unimplemented",_XBT_FUNCTION)
+#define THROW_DEADCODE \
+ THROWF(unknown_error, 0, "Function %s was supposed to be DEADCODE, but it's not",_XBT_FUNCTION)
#define DIE_IMPOSSIBLE xbt_die("The Impossible Did Happen (yet again)")
Resource::Resource()
: p_name(NULL), p_model(NULL)
-{} // FIXME: DEADCODE?
+{THROW_DEADCODE;} // FIXME: DEADCODE?
Resource::Resource(Model *model, const char *name)
- : Resource(model, name, 1/*SURF_RESOURCE_ON*/)
-{} // FIXME: DEADCODE?
+ : Resource(model, name, 1/*ON*/)
+{}
Resource::Resource(Model *model, const char *name, lmm_constraint_t constraint)
- : Resource(model, name, constraint, 1/*SURF_RESOURCE_ON*/)
+ : Resource(model, name, constraint, 1/*ON*/)
{}
Resource::Resource(Model *model, const char *name, lmm_constraint_t constraint, int initiallyOn)
: p_name(xbt_strdup(name))
, p_model(model)
, m_isOn(initiallyOn)
-{} // FIXME: DEADCODE?
+{}
Resource::~Resource() {
/** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component */
lmm_constraint_t getConstraint();
protected:
- lmm_constraint_t p_constraint;
+ lmm_constraint_t p_constraint = nullptr;
};
}