diff options
author | Max Horn | 2011-04-18 17:50:54 +0200 |
---|---|---|
committer | Max Horn | 2011-04-18 18:22:03 +0200 |
commit | cd2fcaf4ca338400ed8ee44566b9a767287efd69 (patch) | |
tree | 6ca2f6ba94b2dfc754957bbe700f85503a4de28f | |
parent | 7c13aa48cd3f103564ac1807f1152d94f1863979 (diff) | |
download | scummvm-rg350-cd2fcaf4ca338400ed8ee44566b9a767287efd69.tar.gz scummvm-rg350-cd2fcaf4ca338400ed8ee44566b9a767287efd69.tar.bz2 scummvm-rg350-cd2fcaf4ca338400ed8ee44566b9a767287efd69.zip |
COMMON: Remove kInvalidPathError
-rw-r--r-- | base/main.cpp | 2 | ||||
-rw-r--r-- | common/error.cpp | 3 | ||||
-rw-r--r-- | common/error.h | 2 | ||||
-rw-r--r-- | engines/scumm/detection.cpp | 2 |
4 files changed, 2 insertions, 7 deletions
diff --git a/base/main.cpp b/base/main.cpp index f45067ff1d..4dfed0f08c 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -131,7 +131,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const // Verify that the game path refers to an actual directory if (!(dir.exists() && dir.isDirectory())) - err = Common::kInvalidPathError; + err = Common::kPathNotDirectory; // Create the game engine if (err.getCode() == Common::kNoError) diff --git a/common/error.cpp b/common/error.cpp index eac8ba1ed1..86557ee2dc 100644 --- a/common/error.cpp +++ b/common/error.cpp @@ -40,8 +40,6 @@ static String errorToString(ErrorCode errorCode) { switch (errorCode) { case kNoError: return _s("No error"); - case kInvalidPathError: - return _s("Invalid path"); case kNoGameDataFoundError: return _s("Game data not found"); case kUnsupportedGameidError: @@ -54,7 +52,6 @@ static String errorToString(ErrorCode errorCode) { case kWritePermissionDenied: return _s("Write permission denied"); - // The following three overlap a bit with kInvalidPathError and each other. Which to keep? case kPathDoesNotExist: return _s("Path does not exist"); case kPathNotDirectory: diff --git a/common/error.h b/common/error.h index dcbe670bfc..f69ada9500 100644 --- a/common/error.h +++ b/common/error.h @@ -47,7 +47,6 @@ namespace Common { */ enum ErrorCode { kNoError = 0, ///< No error occurred - kInvalidPathError, ///< Engine initialization: Invalid game path was passed kNoGameDataFoundError, ///< Engine initialization: No game data was found in the specified location kUnsupportedGameidError, ///< Engine initialization: Gameid not supported by this (Meta)Engine kUnsupportedColorMode, ///< Engine initialization: Engine does not support backend's color mode @@ -56,7 +55,6 @@ enum ErrorCode { kReadPermissionDenied, ///< Unable to read data due to missing read permission kWritePermissionDenied, ///< Unable to write data due to missing write permission - // The following three overlap a bit with kInvalidPathError and each other. Which to keep? kPathDoesNotExist, ///< The specified path does not exist kPathNotDirectory, ///< The specified path does not point to a directory kPathNotFile, ///< The specified path does not point to a file diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 87ec7b85a4..6db3ea740a 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -994,7 +994,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co Common::FSList fslist; Common::FSNode dir(ConfMan.get("path")); if (!dir.isDirectory()) - return Common::kInvalidPathError; + return Common::kPathNotDirectory; if (!dir.getChildren(fslist, Common::FSNode::kListFilesOnly)) return Common::kNoGameDataFoundError; |