Fixed compiler warnings.

This commit is contained in:
Leonardo Zide 2019-06-03 13:23:04 -07:00
parent 7001cdf11d
commit a464606507
3 changed files with 7 additions and 7 deletions

View file

@ -975,9 +975,9 @@ bool lcPiecesLibrary::WriteArchiveCacheFile(const QString& FileName, lcMemFile&
CacheFile.Seek(0, SEEK_SET); CacheFile.Seek(0, SEEK_SET);
Stream.zalloc = (alloc_func)0; Stream.zalloc = nullptr;
Stream.zfree = (free_func)0; Stream.zfree = nullptr;
Stream.opaque = (voidpf)0; Stream.opaque = nullptr;
if (deflateInit2(&Stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY) != Z_OK) if (deflateInit2(&Stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY) != Z_OK)
return false; return false;
@ -1822,7 +1822,7 @@ void lcPiecesLibrary::UnloadUnusedParts()
bool lcPiecesLibrary::LoadTexture(lcTexture* Texture) bool lcPiecesLibrary::LoadTexture(lcTexture* Texture)
{ {
char FileName[LC_MAXPATH]; char FileName[2*LC_MAXPATH];
if (mZipFiles[LC_ZIPFILE_OFFICIAL]) if (mZipFiles[LC_ZIPFILE_OFFICIAL])
{ {

View file

@ -165,7 +165,7 @@ class lcLibraryPrimitive
{ {
public: public:
explicit lcLibraryPrimitive(QString&& FileName, const char* Name, lcZipFileType ZipFileType,quint32 ZipFileIndex, bool Stud, bool SubFile) explicit lcLibraryPrimitive(QString&& FileName, const char* Name, lcZipFileType ZipFileType,quint32 ZipFileIndex, bool Stud, bool SubFile)
: mFileName(FileName) : mFileName(std::move(FileName))
{ {
strncpy(mName, Name, sizeof(mName)); strncpy(mName, Name, sizeof(mName));
mName[sizeof(mName) - 1] = 0; mName[sizeof(mName) - 1] = 0;
@ -177,7 +177,7 @@ public:
mSubFile = SubFile; mSubFile = SubFile;
} }
void SetZipFile(lcZipFileType ZipFileType,quint32 ZipFileIndex) void SetZipFile(lcZipFileType ZipFileType, quint32 ZipFileIndex)
{ {
mZipFileType = ZipFileType; mZipFileType = ZipFileType;
mZipFileIndex = ZipFileIndex; mZipFileIndex = ZipFileIndex;

View file

@ -107,7 +107,7 @@ lcQPropertiesDialog::lcQPropertiesDialog(QWidget *parent, void *data) :
table->setItem((int)InfoTotals.size(), 0, new QTableWidgetItem(tr("Total"))); table->setItem((int)InfoTotals.size(), 0, new QTableWidgetItem(tr("Total")));
for (Row = 0; Row < InfoTotals.size(); Row++) for (Row = 0; Row < (int)InfoTotals.size(); Row++)
{ {
QTableWidgetItem *item = new QTableWidgetItem(QString::number(InfoTotals[Row])); QTableWidgetItem *item = new QTableWidgetItem(QString::number(InfoTotals[Row]));
item->setTextAlignment(Qt::AlignCenter); item->setTextAlignment(Qt::AlignCenter);