1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-30 11:06:43 +00:00

Merge pull request #2314 from OpenMW/stdc++14

bump from C++11 to C++14
This commit is contained in:
Alexei Dobrohotov 2019-04-12 17:34:18 +03:00 committed by GitHub
commit 5b8fc5a151
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View file

@ -405,9 +405,9 @@ if (NOT WIN32 AND NOT APPLE)
endif() endif()
# CXX Compiler settings # CXX Compiler settings
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 14)
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++11 -pedantic -Wno-long-long") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++14 -pedantic -Wno-long-long")
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON ) add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
if (APPLE) if (APPLE)

View file

@ -261,7 +261,7 @@ const MWMechanics::PathgridGraph& MWMechanics::AiPackage::getPathGridGraph(const
CacheMap::iterator found = cache.find(id); CacheMap::iterator found = cache.find(id);
if (found == cache.end()) if (found == cache.end())
{ {
cache.insert(std::make_pair(id, std::unique_ptr<MWMechanics::PathgridGraph>(new MWMechanics::PathgridGraph(cell)))); cache.insert(std::make_pair(id, std::make_unique<MWMechanics::PathgridGraph>(MWMechanics::PathgridGraph(cell))));
} }
return *cache[id].get(); return *cache[id].get();
} }

View file

@ -92,7 +92,6 @@ osg::ref_ptr<Resource::BulletShape> BulletNifLoader::load(const Nif::File& nif)
if (findBoundingBox(node)) if (findBoundingBox(node))
{ {
std::unique_ptr<btCompoundShape> compound (new btCompoundShape); std::unique_ptr<btCompoundShape> compound (new btCompoundShape);
std::unique_ptr<btBoxShape> boxShape(new btBoxShape(getbtVector(mShape->mCollisionBoxHalfExtents))); std::unique_ptr<btBoxShape> boxShape(new btBoxShape(getbtVector(mShape->mCollisionBoxHalfExtents)));
btTransform transform = btTransform::getIdentity(); btTransform transform = btTransform::getIdentity();
transform.setOrigin(getbtVector(mShape->mCollisionBoxTranslate)); transform.setOrigin(getbtVector(mShape->mCollisionBoxTranslate));

View file

@ -10,10 +10,10 @@ BsaArchive::BsaArchive(const std::string &filename)
Bsa::BsaVersion bsaVersion = Bsa::CompressedBSAFile::detectVersion(filename); Bsa::BsaVersion bsaVersion = Bsa::CompressedBSAFile::detectVersion(filename);
if (bsaVersion == Bsa::BSAVER_COMPRESSED) { if (bsaVersion == Bsa::BSAVER_COMPRESSED) {
mFile = std::unique_ptr<Bsa::CompressedBSAFile>(new Bsa::CompressedBSAFile()); mFile = std::make_unique<Bsa::CompressedBSAFile>(Bsa::CompressedBSAFile());
} }
else { else {
mFile = std::unique_ptr<Bsa::BSAFile>(new Bsa::BSAFile()); mFile = std::make_unique<Bsa::BSAFile>(Bsa::BSAFile());
} }
mFile->open(filename); mFile->open(filename);