diff options
author | Chris Robinson <[email protected]> | 2018-11-24 19:16:21 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-24 19:16:21 -0800 |
commit | 377325e794c77f5372a8fc7991eac85809e60e64 (patch) | |
tree | 4227e5185ba3dfb12567f1ecb03745cbdb786c35 /Alc/alc.cpp | |
parent | 9e10f632c7a5d66b0f896753e197970eec3ab7cf (diff) |
Use C++ methods a bit more
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 434e4660..ec7af970 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -3535,11 +3535,10 @@ ALC_API ALCvoid* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar } else { - size_t i = 0; - for(i = 0;i < COUNTOF(alcFunctions);i++) + for(const auto &func : alcFunctions) { - if(strcmp(alcFunctions[i].funcName, funcName) == 0) - return alcFunctions[i].address; + if(strcmp(func.funcName, funcName) == 0) + return func.address; } } @@ -3560,11 +3559,10 @@ ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *e } else { - size_t i = 0; - for(i = 0;i < COUNTOF(alcEnumerations);i++) + for(const auto &enm : alcEnumerations) { - if(strcmp(alcEnumerations[i].enumName, enumName) == 0) - return alcEnumerations[i].value; + if(strcmp(enm.enumName, enumName) == 0) + return enm.value; } } |