Android NDKからC++アームの変換エラーが狭くなりました。Android NDKからC++アームで変換の変換エラーが発生しました
int16_t ax = li.A.x, ay = li.A.y;
int16_t bx = li.B.x, by = li.B.y;
Rect16 rcA = { ax - 8, ay - 8, ax + 8, ay + 8 };
Rect16 rcB = { bx - 8, by - 8, bx + 8, by + 8 };
そして試みをコンパイルするとき、このエラーが出る:
は、次のコードをお持ちの
error: narrowing conversion of '(((int)ay) + -0x00000000000000008)' from 'int' to 'int16_t' inside { }
Rect16構造体:
typedef struct tagRect16 {
int16_t left, top, right, bottom;
} Rect16;
質問は何ですか? Rect16はどのように宣言されていますか? – ognian
このエラーを取り除くには、私は何をする必要があるのですか? –