From c40a87837e806047bfce03ee8ccef94cda8cbda9 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Mon, 24 Oct 2011 12:55:12 +0000 Subject: [PATCH] + less if, more efficient --- src/common/kiwix/reader.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/common/kiwix/reader.cpp b/src/common/kiwix/reader.cpp index dd0b378d..734b1771 100644 --- a/src/common/kiwix/reader.cpp +++ b/src/common/kiwix/reader.cpp @@ -142,18 +142,19 @@ namespace kiwix { if (content.empty()) { this->getContentByUrl( "/I/favicon.png", content, contentLength, mimeType); - } - if (content.empty()) { - this->getContentByUrl( "/I/favicon", content, - contentLength, mimeType); - } - if (content.empty()) { - this->getContentByUrl( "/-/favicon", content, - contentLength, mimeType); + if (content.empty()) { + this->getContentByUrl( "/I/favicon", content, + contentLength, mimeType); + + if (content.empty()) { + this->getContentByUrl( "/-/favicon", content, + contentLength, mimeType); + } + } } - + return content.empty() ? false : true; }