Commit cff1c7df authored by Pavel Vainerman's avatar Pavel Vainerman

Чистка кода от лишних ".c_str()" (использовались там где можно string).

parent 623d49f7
......@@ -321,7 +321,8 @@ void RRDServer::timerInfo( const UniSetTypes::TimerMessage* tm )
myinfo << myname << "(update): '" << it.filename << "' " << v.str() << endl;
rrd_clear_error();
const char* argv = v.str().c_str();
const char* argv = uni_strdup(v.str().c_str());
if( rrd_update_r(it.filename.c_str(),NULL,1,&argv) < 0 )
{
......@@ -329,7 +330,8 @@ void RRDServer::timerInfo( const UniSetTypes::TimerMessage* tm )
err << myname << "(update): Can`t update RRD ('" << it.filename << "'): err: " << string(rrd_get_error());
mycrit << err.str() << endl;
}
delete argv;
break;
}
}
......
......@@ -231,7 +231,7 @@ void ObjectRepository::unregistration(const string& name, const string& section)
if (err.str().empty())
err << "ObjectRepository(unregistrartion): не смог удалить " << name;
throw ORepFailed(err.str().c_str());
throw ORepFailed(err.str());
}
// --------------------------------------------------------------------------
/*!
......@@ -292,7 +292,7 @@ ObjectPtr ObjectRepository::resolve( const string& name, const string& NSName )
if( err.str().empty() )
err << "ObjectRepository(resolve): unknown error for '" << name << "'";
throw ORepFailed(err.str().c_str());
throw ORepFailed(err.str());
}
// --------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment