XCode suddenly considers id and int different types and it is now an error to assign or return one to the other, typecast to fix

This commit is contained in:
Jonathan Campbell 2024-03-28 12:35:58 -07:00
parent 61e4460f27
commit 0cded2e82d
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,7 @@
Next:
- Suddenly Mac OS 14 and XCode consider the "id" and "int" datatypes
different and assigning or returning one to the other is now a compiler
error. Add typecast to enable compile on latest XCode. (joncampbell123)
- INT 33 mouse emulation: Add dosbox.conf options to force a specific
coordinate system for the DOS game with respect to host/guest mouse
cursor integration (getting the DOS cursor to match the host cursor

View File

@ -1437,7 +1437,8 @@ char *QZ_GetIMValues(_THIS, SDL_imvalue value, int *alt)
*alt = GetEnableIME();
return NULL;
case SDL_IM_FONT_SIZE:
*alt = [field_edit getFontHeight];
// 2024-03-28 Suddenly XCode considers id different from int and throws an error here without typecast
*alt = (int)[field_edit getFontHeight];
return NULL;
default:
SDL_SetError("QZ_GetIMValues: nuknown enum type %d", value);
@ -1456,7 +1457,8 @@ int QZ_FlushIMString(_THIS, void *buffer)
*(char *)buffer = 0;
}
}
return [field_edit getTextLength];
// 2024-03-28 Suddenly XCode considers id different from int and throws an error here without typecast
return (int)[field_edit getTextLength];
}
#else /* !ENABLE_IM_EVENT */