aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2017-12-02 16:43:48 +0100
committerBastien Bouclet2018-05-10 07:50:44 +0200
commit9587dd5c21d388616dc8d42db909390fab384c2f (patch)
treebbe6c151bdb0002e892bb9271656a22a7780db60 /engines
parent82296866b4f79798d1fd5085bfd91fa2fb829d6a (diff)
downloadscummvm-rg350-9587dd5c21d388616dc8d42db909390fab384c2f.tar.gz
scummvm-rg350-9587dd5c21d388616dc8d42db909390fab384c2f.tar.bz2
scummvm-rg350-9587dd5c21d388616dc8d42db909390fab384c2f.zip
ENGINES: Fix clang-tidy warnings
Diffstat (limited to 'engines')
-rw-r--r--engines/advancedDetector.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index d258f49621..dea9b8e6ec 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -167,7 +167,7 @@ GameList AdvancedMetaEngine::detectGames(const Common::FSList &fslist, bool useU
if (matches.empty()) {
// Use fallback detector if there were no matches by other means
const ADGameDescription *fallbackDesc = fallbackDetect(allFiles, fslist);
- if (fallbackDesc != 0) {
+ if (fallbackDesc != nullptr) {
GameDescriptor desc(toGameDescriptor(*fallbackDesc, _gameIds));
updateGameDescriptor(desc, fallbackDesc);
detectedGames.push_back(desc);
@@ -336,7 +336,7 @@ void AdvancedMetaEngine::reportUnknown(const Common::FSNode &path, const ADFileP
Common::String reportTranslated = Common::String::format(_(reportCommon), path.getPath().c_str(), getName(), "https://bugs.scummvm.org/");
Common::String bugtrackerAffectedEngine = getName();
- if (matchedGameIds.size()) {
+ if (!matchedGameIds.empty()) {
report += "\n\n";
reportTranslated += "\n\n";
report += "Matched game IDs:";
@@ -460,7 +460,7 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons
// Check which files are included in some ADGameDescription *and* are present.
// Compute MD5s and file sizes for these files.
- for (descPtr = _gameDescriptors; ((const ADGameDescription *)descPtr)->gameId != 0; descPtr += _descItemSize) {
+ for (descPtr = _gameDescriptors; ((const ADGameDescription *)descPtr)->gameId != nullptr; descPtr += _descItemSize) {
g = (const ADGameDescription *)descPtr;
for (fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) {
@@ -484,7 +484,7 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons
// MD5 based matching
uint i;
- for (i = 0, descPtr = _gameDescriptors; ((const ADGameDescription *)descPtr)->gameId != 0; descPtr += _descItemSize, ++i) {
+ for (i = 0, descPtr = _gameDescriptors; ((const ADGameDescription *)descPtr)->gameId != nullptr; descPtr += _descItemSize, ++i) {
g = (const ADGameDescription *)descPtr;
bool fileMissing = false;
@@ -516,7 +516,7 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons
if (hashOrSizeMismatch)
continue;
- if (fileDesc->md5 != NULL && fileDesc->md5 != filesProps[tstr].md5) {
+ if (fileDesc->md5 != nullptr && fileDesc->md5 != filesProps[tstr].md5) {
debug(3, "MD5 Mismatch. Skipping (%s) (%s)", fileDesc->md5, filesProps[tstr].md5.c_str());
fileMissing = true;
hashOrSizeMismatch = true;
@@ -545,7 +545,7 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons
// cases.
if (allFilesPresent) {
gotAnyMatchesWithAllFiles = true;
- if (!matchedGameIds.size() || strcmp(matchedGameIds.back(), g->gameId) != 0)
+ if (matchedGameIds.empty() || strcmp(matchedGameIds.back(), g->gameId) != 0)
matchedGameIds.push_back(g->gameId);
}