Cosmetics: Fix static analysis warnings

This commit is contained in:
Felipe Zimmerle
2015-10-27 10:54:57 -03:00
parent 11a1045f47
commit 7afc07914f
14 changed files with 39 additions and 30 deletions

View File

@@ -56,11 +56,10 @@ void DebugLogWriter::close(const std::string& fileName) {
void DebugLogWriter::write(const std::string& file, const std::string &msg) {
std::map<std::string, DebugLogWriterAgent *>::iterator it;
DebugLogWriterAgent *agent;
it = agents.find(file);
if (it != agents.end()) {
agent = it->second;
DebugLogWriterAgent *agent = it->second;
agent->write(msg);
} else {
std::cout << file << ": " << msg << std::endl;