Simplify string concatenation

This commit is contained in:
Emmanuel Papin 2015-06-08 20:34:41 +02:00
parent a32a0f2752
commit 1fb6ed8a06
1 changed files with 5 additions and 9 deletions

View File

@ -110,14 +110,10 @@ void Plugin::registerPlugin(PluginManager &K)
else
{
// Raise an exception to inform the plugin manager that something bad happened
std::ostringstream strPluginVersion;
std::ostringstream strZMVersion;
std::string strError;
strPluginVersion << pluginEngineVersion;
strZMVersion << ZM_ENGINE_VERSION;
strError = "Could not load '" + m_sPluginFileName
+ "' (engine version mistmatch: ZM=" + strZMVersion.str()
+ " / plugin=" + strPluginVersion.str() + ")";
throw std::logic_error(strError.c_str());
std::ostringstream strError;
strError << "Could not load '" << m_sPluginFileName
<< "' (engine version mistmatch: ZM=" << ZM_ENGINE_VERSION
<< " / plugin=" << pluginEngineVersion << ")";
throw std::logic_error(strError.str().c_str());
}
}