aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-24 19:16:21 -0800
committerChris Robinson <[email protected]>2018-11-24 19:16:21 -0800
commit377325e794c77f5372a8fc7991eac85809e60e64 (patch)
tree4227e5185ba3dfb12567f1ecb03745cbdb786c35 /Alc/alc.cpp
parent9e10f632c7a5d66b0f896753e197970eec3ab7cf (diff)
Use C++ methods a bit more
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp14
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;
}
}