Make ReadALConfig noexcept in C++

This commit is contained in:
Chris Robinson
2018-11-13 02:15:10 -08:00
parent 2445bfd578
commit 6f635d3b1a
2 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -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"};
+4 -1
View File
@@ -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);