Fix some compiler warnings

pull/2030/head
Andrei Kortunov 6 years ago
parent c114e1278e
commit ad36834671

@ -520,7 +520,6 @@ std::pair<float, float> CSMWorld::ConstInfoSelectWrapper::getConditionFloatRange
const float FloatMax = std::numeric_limits<float>::infinity(); const float FloatMax = std::numeric_limits<float>::infinity();
const float FloatMin = -std::numeric_limits<float>::infinity(); const float FloatMin = -std::numeric_limits<float>::infinity();
const float Epsilon = std::numeric_limits<float>::epsilon(); const float Epsilon = std::numeric_limits<float>::epsilon();
const std::pair<float, float> InvalidRange(FloatMax, FloatMin);
float value = mConstSelect.mValue.getFloat(); float value = mConstSelect.mValue.getFloat();

@ -31,11 +31,13 @@ void Wizard::ExistingInstallationPage::initializePage()
// Hide the default item if there are installations to choose from // Hide the default item if there are installations to choose from
installationsList->item(0)->setHidden(!paths.isEmpty()); installationsList->item(0)->setHidden(!paths.isEmpty());
foreach (const QString &path, paths) { foreach (const QString &path, paths)
QListWidgetItem *item = new QListWidgetItem(path); {
if (installationsList->findItems(path, Qt::MatchExactly).isEmpty()) if (installationsList->findItems(path, Qt::MatchExactly).isEmpty())
{
QListWidgetItem *item = new QListWidgetItem(path);
installationsList->addItem(item); installationsList->addItem(item);
}
} }
connect(installationsList, SIGNAL(currentTextChanged(QString)), connect(installationsList, SIGNAL(currentTextChanged(QString)),

@ -168,7 +168,7 @@ QVariant ContentSelectorModel::ContentModel::data(const QModelIndex &index, int
case Qt::DisplayRole: case Qt::DisplayRole:
{ {
if (column >=0 && column <=EsmFile::FileProperty_GameFile) if (column >=0 && column <=EsmFile::FileProperty_GameFile)
return file->fileProperty(static_cast<const EsmFile::FileProperty>(column)); return file->fileProperty(static_cast<EsmFile::FileProperty>(column));
return QVariant(); return QVariant();
} }

@ -134,9 +134,9 @@ public:
{ {
state->bindVertexBufferObject(bufferobject); state->bindVertexBufferObject(bufferobject);
glVertexPointer(3, GL_FLOAT, sizeof(MyGUI::Vertex), (char*)nullptr); glVertexPointer(3, GL_FLOAT, sizeof(MyGUI::Vertex), static_cast<char*>(0));
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(MyGUI::Vertex), (char*)nullptr + 12); glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(MyGUI::Vertex), static_cast<char*>(0) + 12);
glTexCoordPointer(2, GL_FLOAT, sizeof(MyGUI::Vertex), (char*)nullptr + 16); glTexCoordPointer(2, GL_FLOAT, sizeof(MyGUI::Vertex), static_cast<char*>(0) + 16);
} }
else else
{ {

Loading…
Cancel
Save