From: Martin Quinson Date: Sat, 16 Sep 2017 20:34:17 +0000 (+0200) Subject: instr: small cleanup X-Git-Tag: v3_17~105 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8adeec4061e3ee9bfee9a55378e883e25b2c6e9a instr: small cleanup --- diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index 8d10295cb1..d65b5b4b49 100644 --- a/src/instr/instr_paje_trace.cpp +++ b/src/instr/instr_paje_trace.cpp @@ -765,8 +765,8 @@ void simgrid::instr::ResetStateEvent::print() simgrid::instr::StartLinkEvent::~StartLinkEvent() { - free(value); - free(key); + free(value_); + free(key_); } simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t container, Type* type, container_t sourceContainer, const char* value, const char* key) @@ -776,17 +776,17 @@ simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t con simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t container, Type* type, container_t sourceContainer, const char* value, const char* key, int size) + : container_(container) + , type_(type) + , sourceContainer_(sourceContainer) + , value_(xbt_strdup(value)) + , key_(xbt_strdup(key)) + , size_(size) { eventType_ = PAJE_StartLink; this->timestamp_ = timestamp; - this->type = type; - this->container = container; - this->sourceContainer = sourceContainer; - this->value = xbt_strdup(value); - this->key = xbt_strdup(key); - this->size = size; - XBT_DEBUG("%s: event_type=%d, timestamp=%f, value:%s", __FUNCTION__, (int)eventType_, this->timestamp_, this->value); + XBT_DEBUG("%s: event_type=%d, timestamp=%f, value:%s", __FUNCTION__, (int)eventType_, this->timestamp_, this->value_); insert_into_buffer (this); } @@ -798,11 +798,11 @@ void simgrid::instr::StartLinkEvent::print() stream << std::fixed << std::setprecision(TRACE_precision()); stream << (int)this->eventType_; print_timestamp(this); - stream << " " << type->id_ << " " << container->id_ << " " << value; - stream << " " << sourceContainer->id_ << " " << key; + stream << " " << type_->id_ << " " << container_->id_ << " " << value_; + stream << " " << sourceContainer_->id_ << " " << key_; if (TRACE_display_sizes()) { - stream << " " << size; + stream << " " << size_; } print_row(); } else if (instr_fmt_type == instr_fmt_TI) { diff --git a/src/instr/instr_private.h b/src/instr/instr_private.h index 1043a213c5..a748d301c8 100644 --- a/src/instr/instr_private.h +++ b/src/instr/instr_private.h @@ -219,21 +219,20 @@ public: }; class StartLinkEvent : public PajeEvent { - public: - Container* container; - Type* type; - Container* sourceContainer; - char* value; - char* key; - int size; + Container* container_; + Type* type_; + Container* sourceContainer_; + char* value_; + char* key_; + int size_; - public: - ~StartLinkEvent(); - StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, const char* value, - const char* key); - StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, const char* value, - const char* key, int size); - void print() override; +public: + ~StartLinkEvent(); + StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, const char* value, + const char* key); + StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, const char* value, + const char* key, int size); + void print() override; }; class EndLinkEvent : public PajeEvent {