diff options
author | Chris Robinson <[email protected]> | 2018-11-13 02:15:10 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-13 02:15:10 -0800 |
commit | 6f635d3b1a3c80767dd7f1ba6c9ccce78ac35efc (patch) | |
tree | ef3bda9dd11e8be543b6a9a7dc099d4881a1cd3e | |
parent | 2445bfd578d8208baa4fdb4e4c4774f1df6e4ba9 (diff) |
Make ReadALConfig noexcept in C++
-rw-r--r-- | Alc/alconfig.cpp | 4 | ||||
-rw-r--r-- | Alc/alconfig.h | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Alc/alconfig.cpp b/Alc/alconfig.cpp index fedb6703..5198f830 100644 --- a/Alc/alconfig.cpp +++ b/Alc/alconfig.cpp @@ -285,7 +285,7 @@ void LoadConfigFromFile(std::istream &f) #ifdef _WIN32 -void ReadALConfig(void) +void ReadALConfig(void) noexcept { WCHAR buffer[MAX_PATH]; if(SHGetSpecialFolderPathW(nullptr, buffer, CSIDL_APPDATA, FALSE) != FALSE) @@ -321,7 +321,7 @@ void ReadALConfig(void) } } #else -void ReadALConfig(void) +void ReadALConfig(void) noexcept { const char *str{"/etc/openal/alsoft.conf"}; diff --git a/Alc/alconfig.h b/Alc/alconfig.h index cb8d8717..627ef48a 100644 --- a/Alc/alconfig.h +++ b/Alc/alconfig.h @@ -2,10 +2,13 @@ #define ALCONFIG_H #ifdef __cplusplus +#define NOEXCEPT noexcept extern "C" { +#else +#define NOEXCEPT #endif -void ReadALConfig(void); +void ReadALConfig(void) NOEXCEPT; void FreeALConfig(void); int ConfigValueExists(const char *devName, const char *blockName, const char *keyName); |