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);
Stream.zalloc = (alloc_func)0;
Stream.zfree = (free_func)0;
Stream.opaque = (voidpf)0;
Stream.zalloc = nullptr;
Stream.zfree = nullptr;
Stream.opaque = nullptr;
if (deflateInit2(&Stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY) != Z_OK)
return false;
@ -1822,7 +1822,7 @@ void lcPiecesLibrary::UnloadUnusedParts()
bool lcPiecesLibrary::LoadTexture(lcTexture* Texture)
{
char FileName[LC_MAXPATH];
char FileName[2*LC_MAXPATH];
if (mZipFiles[LC_ZIPFILE_OFFICIAL])
{

View file

@ -165,7 +165,7 @@ class lcLibraryPrimitive
{
public:
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));
mName[sizeof(mName) - 1] = 0;

View file

@ -107,7 +107,7 @@ lcQPropertiesDialog::lcQPropertiesDialog(QWidget *parent, void *data) :
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]));
item->setTextAlignment(Qt::AlignCenter);