Skip to content

Commit

Permalink
memory leak--
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Nov 3, 2018
1 parent ed04e47 commit e462d35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/wrench/logging/TerminalOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace wrench {

static const char * color_codes[];

static std::map<simgrid::s4u::ActorPtr, std::string> colormap;
static std::map<simgrid::s4u::Actor *, std::string> colormap;

static std::string getThisProcessLoggingColor();

Expand Down
8 changes: 4 additions & 4 deletions src/wrench/logging/TerminalOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace wrench {
"\033[1;37m",
};

std::map<simgrid::s4u::ActorPtr, std::string> TerminalOutput::colormap;
std::map<simgrid::s4u::Actor *, std::string> TerminalOutput::colormap;
bool TerminalOutput::color_enabled = true;

/**
Expand All @@ -34,7 +34,7 @@ namespace wrench {
* @param color: a terminal output color
*/
void TerminalOutput::setThisProcessLoggingColor(Color color) {
TerminalOutput::colormap[simgrid::s4u::Actor::self()] = TerminalOutput::color_codes[color];
TerminalOutput::colormap[simgrid::s4u::Actor::self().get()] = TerminalOutput::color_codes[color];
}

/**
Expand Down Expand Up @@ -69,10 +69,10 @@ namespace wrench {
std::string TerminalOutput::getThisProcessLoggingColor() {

if (simgrid::s4u::this_actor::is_maestro() ||
(TerminalOutput::colormap.find(simgrid::s4u::Actor::self()) == TerminalOutput::colormap.end())) {
(TerminalOutput::colormap.find(simgrid::s4u::Actor::self().get()) == TerminalOutput::colormap.end())) {
return "";
} else {
return TerminalOutput::colormap[simgrid::s4u::Actor::self()];
return TerminalOutput::colormap[simgrid::s4u::Actor::self().get()];
}
}

Expand Down

0 comments on commit e462d35

Please sign in to comment.