wsd: avoid std::string::compare() in FileServer

When we are just interested in equality. compare() is more meant for
sorting functions where negative/zero/positive return value is useful.

Change-Id: I11138a14dc08e23d33f3848aeb734d9f56f3e9f7
This commit is contained in:
Miklos Vajna
2017-04-12 13:46:09 +02:00
parent 1752dd74d6
commit 4dbdd72bc2

View File

@ -177,7 +177,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, Poco::M
if (it != request.end())
{
// if ETags match avoid re-sending the file.
if (!noCache && !it->second.compare("\"" LOOLWSD_VERSION_HASH "\""))
if (!noCache && it->second == "\"" LOOLWSD_VERSION_HASH "\"")
{
// TESTME: harder ... - do we even want ETag support ?
std::ostringstream oss;