mirror of
https://github.com/leozide/leocad
synced 2025-01-29 20:34:50 +01:00
Fixed compiler warnings.
This commit is contained in:
parent
90b8409017
commit
378ece224f
4 changed files with 8 additions and 10 deletions
|
@ -24,7 +24,7 @@
|
|||
#include "lc_colors.h"
|
||||
#include <functional>
|
||||
|
||||
#define LC_ENABLE_GAMEPAD (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
#define LC_ENABLE_GAMEPAD (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
|
||||
#if LC_ENABLE_GAMEPAD
|
||||
#include <QtGamepad/QGamepad>
|
||||
|
|
|
@ -220,7 +220,7 @@ void lcTexture::Upload(lcContext* Context)
|
|||
int FilterIndex = FilterFlags >> LC_TEXTURE_FILTER_SHIFT;
|
||||
int MipIndex = mFlags & LC_TEXTURE_MIPMAPS ? 0 : 1;
|
||||
|
||||
int Faces, Target;
|
||||
unsigned int Faces, Target;
|
||||
|
||||
if ((mFlags & LC_TEXTURE_CUBEMAP) == 0)
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ void lcTexture::Upload(lcContext* Context)
|
|||
if (mFlags & LC_TEXTURE_CUBEMAP)
|
||||
Target = GL_TEXTURE_CUBE_MAP_POSITIVE_X;
|
||||
|
||||
for (int FaceIdx = 0; FaceIdx < Faces; FaceIdx++)
|
||||
for (size_t FaceIdx = 0; FaceIdx < Faces; FaceIdx++)
|
||||
{
|
||||
void* Data = mImages[CurrentImage].mData;
|
||||
glTexImage2D(Target, 0, Format, mWidth, mHeight, 0, Format, GL_UNSIGNED_BYTE, Data);
|
||||
|
|
|
@ -84,8 +84,6 @@ void MinifigWizard::OnInitialUpdate()
|
|||
MakeCurrent();
|
||||
mContext->SetDefaultState();
|
||||
|
||||
memset(&mMinifig, 0, sizeof(lcMinifig));
|
||||
|
||||
static_assert(sizeof(MinifigWizard::mSectionNames) / sizeof(MinifigWizard::mSectionNames[0]) == LC_MFW_NUMITEMS, "Array size mismatch.");
|
||||
|
||||
const int ColorCodes[LC_MFW_NUMITEMS] = { 4, 7, 14, 7, 1, 0, 7, 4, 4, 14, 14, 7, 7, 0, 0, 7, 7 };
|
||||
|
@ -95,13 +93,13 @@ void MinifigWizard::OnInitialUpdate()
|
|||
for (int i = 0; i < LC_MFW_NUMITEMS; i++)
|
||||
{
|
||||
mMinifig.Colors[i] = lcGetColorIndex(ColorCodes[i]);
|
||||
mMinifig.Angles[i] = 0.0f;
|
||||
mMinifig.Matrices[i] = lcMatrix44Identity();
|
||||
|
||||
PieceInfo* Info = Library->FindPiece(Pieces[i], nullptr, false, false);
|
||||
if (Info)
|
||||
{
|
||||
mMinifig.Parts[i] = Info;
|
||||
mMinifig.Parts[i] = Info;
|
||||
if (Info)
|
||||
Library->LoadPieceInfo(Info, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
Library->WaitForLoadQueue();
|
||||
|
|
|
@ -7,7 +7,7 @@ greaterThan(QT_MAJOR_VERSION, 4) {
|
|||
}
|
||||
|
||||
equals(QT_MAJOR_VERSION, 5) {
|
||||
greaterThan(QT_MINOR_VERSION, 9) {
|
||||
greaterThan(QT_MINOR_VERSION, 11) {
|
||||
QT += gamepad
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue