diff options
author | Max Horn | 2011-05-23 19:36:45 +0200 |
---|---|---|
committer | Max Horn | 2011-05-23 19:39:25 +0200 |
commit | 20cad6e8b6fe9ae843245697e872256c4ca1e545 (patch) | |
tree | e6ddd7b3f8ff6be39ea9ceab523050e73e3ba354 /common | |
parent | 6f6051a9e1da4d4debc1bf851b101c7a40d8b531 (diff) | |
download | scummvm-rg350-20cad6e8b6fe9ae843245697e872256c4ca1e545.tar.gz scummvm-rg350-20cad6e8b6fe9ae843245697e872256c4ca1e545.tar.bz2 scummvm-rg350-20cad6e8b6fe9ae843245697e872256c4ca1e545.zip |
COMMON: Modify Base::processSettings, get rid of Common::kArgumentNotProcessed
Instead of defining a hacked up Common::Error code, split the return
value of processSettings into two parts: An error code, and a value
which indicates whether the specified command was completely handled
by processSettings or not.
Diffstat (limited to 'common')
-rw-r--r-- | common/error.cpp | 3 | ||||
-rw-r--r-- | common/error.h | 3 | ||||
-rw-r--r-- | common/forbidden.h | 5 | ||||
-rw-r--r-- | common/textconsole.cpp | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/common/error.cpp b/common/error.cpp index f150f268c0..a6c52a0ce9 100644 --- a/common/error.cpp +++ b/common/error.cpp @@ -67,9 +67,6 @@ static String errorToString(ErrorCode errorCode) { case kEnginePluginNotSupportSaves: return _s("Engine plugin does not support save states"); - case kArgumentNotProcessed: - return _s("Command line argument not processed"); - case kUnknownError: default: return _s("Unknown error"); diff --git a/common/error.h b/common/error.h index c06cec4a0b..23c12b67e4 100644 --- a/common/error.h +++ b/common/error.h @@ -47,7 +47,6 @@ enum ErrorCode { kUnsupportedGameidError, ///< Engine initialization: Gameid not supported by this (Meta)Engine kUnsupportedColorMode, ///< Engine initialization: Engine does not support backend's color mode - kReadPermissionDenied, ///< Unable to read data due to missing read permission kWritePermissionDenied, ///< Unable to write data due to missing write permission @@ -63,8 +62,6 @@ enum ErrorCode { kEnginePluginNotFound, ///< Failed to find plugin to handle target kEnginePluginNotSupportSaves, ///< Failed if plugin does not support listing save states - kArgumentNotProcessed, ///< Used in command line parsing - kUnknownError ///< Catch-all error, used if no other error code matches }; diff --git a/common/forbidden.h b/common/forbidden.h index d9282b7885..f127983006 100644 --- a/common/forbidden.h +++ b/common/forbidden.h @@ -140,6 +140,11 @@ #define system(a) FORBIDDEN_SYMBOL_REPLACEMENT #endif +#ifndef FORBIDDEN_SYMBOL_EXCEPTION_exit +#undef exit +#define exit(a) FORBIDDEN_SYMBOL_REPLACEMENT +#endif + #ifndef FORBIDDEN_SYMBOL_EXCEPTION_getenv #undef getenv #define getenv(a) FORBIDDEN_SYMBOL_REPLACEMENT diff --git a/common/textconsole.cpp b/common/textconsole.cpp index 0bd233d206..f2325ac9ad 100644 --- a/common/textconsole.cpp +++ b/common/textconsole.cpp @@ -19,6 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#define FORBIDDEN_SYMBOL_EXCEPTION_exit + #include "common/textconsole.h" #include "common/system.h" #include "common/str.h" |