dxerr8: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1066283874
commit
4c28872037
|
@ -51,7 +51,7 @@ const char * WINAPI DXGetErrorString8A(HRESULT hr)
|
|||
{
|
||||
unsigned int i, j, k = 0;
|
||||
|
||||
for (i = sizeof(info)/sizeof(info[0]); i != 0; i /= 2) {
|
||||
for (i = ARRAY_SIZE(info); i != 0; i /= 2) {
|
||||
j = k + (i / 2);
|
||||
if (hr == info[j].hr)
|
||||
return info[j].resultA;
|
||||
|
@ -69,7 +69,7 @@ const WCHAR * WINAPI DXGetErrorString8W(HRESULT hr)
|
|||
static const WCHAR unknown[] = { 'U', 'n', 'k', 'n', 'o', 'w', 'n', 0 };
|
||||
unsigned int i, j, k = 0;
|
||||
|
||||
for (i = sizeof(info)/sizeof(info[0]); i != 0; i /= 2) {
|
||||
for (i = ARRAY_SIZE(info); i != 0; i /= 2) {
|
||||
j = k + (i / 2);
|
||||
if (hr == info[j].hr)
|
||||
return info[j].resultW;
|
||||
|
@ -86,7 +86,7 @@ const char * WINAPI DXGetErrorDescription8A(HRESULT hr)
|
|||
{
|
||||
unsigned int i, j, k = 0;
|
||||
|
||||
for (i = sizeof(info)/sizeof(info[0]); i != 0; i /= 2) {
|
||||
for (i = ARRAY_SIZE(info); i != 0; i /= 2) {
|
||||
j = k + (i / 2);
|
||||
if (hr == info[j].hr)
|
||||
return info[j].descriptionA;
|
||||
|
@ -104,7 +104,7 @@ const WCHAR * WINAPI DXGetErrorDescription8W(HRESULT hr)
|
|||
static const WCHAR na[] = { 'n', '/', 'a', 0 };
|
||||
unsigned int i, j, k = 0;
|
||||
|
||||
for (i = sizeof(info)/sizeof(info[0]); i != 0; i /= 2) {
|
||||
for (i = ARRAY_SIZE(info); i != 0; i /= 2) {
|
||||
j = k + (i / 2);
|
||||
if (hr == info[j].hr)
|
||||
return info[j].descriptionW;
|
||||
|
|
Loading…
Reference in New Issue