diff --git a/apps/opencs/model/tools/tools.cpp b/apps/opencs/model/tools/tools.cpp index 3b2c80263..445db53af 100644 --- a/apps/opencs/model/tools/tools.cpp +++ b/apps/opencs/model/tools/tools.cpp @@ -61,12 +61,7 @@ CSMDoc::OperationHolder *CSMTools::Tools::getVerifier() connect (&mVerifier, SIGNAL (reportMessage (const CSMDoc::Message&, int)), this, SLOT (verifierMessage (const CSMDoc::Message&, int))); - std::vector mandatoryIds; // I want C++11, damn it! - mandatoryIds.push_back ("Day"); - mandatoryIds.push_back ("DaysPassed"); - mandatoryIds.push_back ("GameHour"); - mandatoryIds.push_back ("Month"); - mandatoryIds.push_back ("PCRace"); + std::vector mandatoryIds {"Day", "DaysPassed", "GameHour", "Month", "PCRace"}; mVerifierOperation->appendStage (new MandatoryIdStage (mData.getGlobals(), CSMWorld::UniversalId (CSMWorld::UniversalId::Type_Globals), mandatoryIds)); diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 34ecd57d0..986717cb2 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -764,10 +764,8 @@ std::vector< CSMWorld::UniversalId > CSVWorld::Table::getDraggedRecords() const QModelIndexList selectedRows = selectionModel()->selectedRows(); std::vector idToDrag; - foreach (QModelIndex it, selectedRows) //I had a dream. Dream where you could use C++11 in OpenMW. - { + for (QModelIndex& it : selectedRows) idToDrag.push_back (getUniversalId (it.row())); - } return idToDrag; } diff --git a/apps/openmw_test_suite/esm/test_fixed_string.cpp b/apps/openmw_test_suite/esm/test_fixed_string.cpp index 59dd7fe66..598e8daad 100644 --- a/apps/openmw_test_suite/esm/test_fixed_string.cpp +++ b/apps/openmw_test_suite/esm/test_fixed_string.cpp @@ -66,10 +66,8 @@ TEST(EsmFixedString, struct_size) TEST(EsmFixedString, DISABLED_is_pod) { - /* TODO: enable in C++11 - * ASSERT_TRUE(std::is_pod::value); - * ASSERT_TRUE(std::is_pod::value); - * ASSERT_TRUE(std::is_pod::value); - * ASSERT_TRUE(std::is_pod::value); - */ + ASSERT_TRUE(std::is_pod::value); + ASSERT_TRUE(std::is_pod::value); + ASSERT_TRUE(std::is_pod::value); + ASSERT_TRUE(std::is_pod::value); }