diff --git a/CMakeLists.txt b/CMakeLists.txt index db886c1..c4311d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,13 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) project(CloonelJump CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/include") include(TargetArch) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic -Wconversion") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -Wall -Wextra -pedantic -Wconversion -DWITH_DEBUG_VISUALS -O0") -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -Wall -Wextra -pedantic -Wconversion -O3") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wconversion") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -pedantic -Wconversion -DWITH_DEBUG_VISUALS -O0") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -Wextra -pedantic -Wconversion -O3") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3") @@ -133,3 +133,18 @@ if (RASPBERRY_PI) bcm_host ) endif(RASPBERRY_PI) + +target_compile_features(${PROJECT_NAME} + PRIVATE cxx_nullptr + PRIVATE cxx_range_for + PRIVATE cxx_lambdas + PRIVATE cxx_decltype_auto + PRIVATE cxx_defaulted_functions + PRIVATE cxx_deleted_functions + PRIVATE cxx_auto_type + PRIVATE cxx_decltype_incomplete_return_types + PRIVATE cxx_defaulted_move_initializers + PRIVATE cxx_noexcept + PRIVATE cxx_rvalue_references + PRIVATE cxx_delegating_constructors +) diff --git a/src/character.cpp b/src/character.cpp index ffd1a39..cdc1839 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -33,18 +33,8 @@ namespace cloonel { ///------------------------------------------------------------------------- ///------------------------------------------------------------------------- Character::Character (const std::string& parPath, SDLMain* parMain, float2 parSize) : - Placeable(float2(0.0f)), - Drawable(parSize), - m_bottomBar(float2(0.0f), parSize.x()), - m_screenRatio(parMain), - m_bounceCallback(&DoNothing), - m_texture(new Texture(parPath, parMain, false)) -#if defined(WITH_DEBUG_VISUALS) - , m_bottomBarDrawable(parMain, Colour(250, 5, 1), static_cast(m_bottomBar.From()), static_cast(m_bottomBar.To())) -#endif + Character(std::string(parPath), parMain, parSize) { - assert(parMain); - m_bottomBar.SetCallback(std::bind(&Character::OnBounce, this, std::placeholders::_1, std::placeholders::_2)); } ///------------------------------------------------------------------------- @@ -66,8 +56,7 @@ namespace cloonel { ///------------------------------------------------------------------------- ///------------------------------------------------------------------------- - Character::~Character() noexcept { - } + Character::~Character() noexcept = default; ///------------------------------------------------------------------------- ///-------------------------------------------------------------------------