qgltf: Fix MSVC warning about narrowing conversion

Use int, fixing:
qgltf.cpp(158): warning C4838: conversion from 'QFlags<QIODevice::OpenModeFlag>' to 'ushort' requires a narrowing conversion
qgltf.cpp(159): warning C4838: conversion from 'QFlags<QIODevice::OpenModeFlag>' to 'ushort' requires a narrowing conversion
qgltf.cpp(160): warning C4838: conversion from 'QFlags<QIODevice::OpenModeFlag>' to 'ushort' requires a narrowing conversion
qgltf.cpp(161): warning C4838: conversion from 'QFlags<QIODevice::OpenModeFlag>' to 'ushort' requires a narrowing conversion
qgltf.cpp(163): warning C4838: conversion from 'QFlags<QIODevice::OpenModeFlag>' to 'ushort' requires a narrowing conversion
qgltf.cpp(165): warning C4838: conversion from 'QFlags<QIODevice::OpenModeFlag>' to 'ushort' requires a narrowing conversion

Change-Id: I8fa5452b6485d32c8d86172497cf877d5bcaf0e2
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
This commit is contained in:
Friedemann Kleint 2020-01-02 15:24:27 +01:00
parent e52382023b
commit 05cb6bb5f3
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ static QIODevice::OpenMode openModeFromText(const char *name) noexcept
{
static const struct OpenModeMapping {
char name[2];
ushort mode;
int mode;
} openModeMapping[] = {
{ { 'r', 0 }, QIODevice::ReadOnly },
{ { 'r', '+' }, QIODevice::ReadWrite },