From: Arnaud Giersch Date: Wed, 22 Jan 2014 20:38:21 +0000 (+0100) Subject: Fix initialization order again. X-Git-Tag: v3_11_beta~120^2~16 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/efef29a1bb7de4de33ab2ba044358ed4eb9787d6 Fix initialization order again. --- diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index fd6d09009a..726e0fded0 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -663,21 +663,18 @@ Resource::Resource() {} Resource::Resource(surf_model_t model, const char *name, xbt_dict_t props) - : m_stateCurrent(SURF_RESOURCE_ON) - , p_name(xbt_strdup(name)), p_properties(props), p_model(model) - , m_running(true) + : p_name(xbt_strdup(name)), p_properties(props), p_model(model) + , m_running(true), m_stateCurrent(SURF_RESOURCE_ON) {} Resource::Resource(surf_model_t model, const char *name, xbt_dict_t props, lmm_constraint_t constraint) - : m_stateCurrent(SURF_RESOURCE_ON) - , p_name(xbt_strdup(name)), p_properties(props), p_model(model) - , m_running(true), p_constraint(constraint) + : p_name(xbt_strdup(name)), p_properties(props), p_model(model) + , m_running(true), m_stateCurrent(SURF_RESOURCE_ON), p_constraint(constraint) {} Resource::Resource(surf_model_t model, const char *name, xbt_dict_t props, e_surf_resource_state_t stateInit) - : m_stateCurrent(stateInit) - , p_name(xbt_strdup(name)), p_properties(props), p_model(model) - , m_running(true) + : p_name(xbt_strdup(name)), p_properties(props), p_model(model) + , m_running(true), m_stateCurrent(stateInit) {} Resource::~Resource() {