...
 
Commits (6)
......@@ -27,15 +27,14 @@ include(GNUInstallDirs)
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(OpenGL REQUIRED)
find_package(Boost COMPONENTS system filesystem signals REQUIRED)
find_package(Boost COMPONENTS REQUIRED)
pkg_search_module(SDL2 REQUIRED sdl2)
pkg_search_module(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
pkg_search_module(SDL2MIXER REQUIRED SDL2_mixer>=2.0.0)
pkg_search_module(PNG REQUIRED libpng)
pkg_search_module(JSONCPP REQUIRED jsoncpp)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
if (BUILD_TESTS)
# add 'make test' target, use 'make test ARGS="-V"' or 'ctest -V' for verbose
......@@ -122,7 +121,7 @@ target_include_directories(libpingus PUBLIC
${SDL2_INCLUDE_DIRS}
${SDL2IMAGE_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS})
target_compile_definitions(libpingus PUBLIC -DVERSION="0.8.0")
target_compile_definitions(libpingus PUBLIC -DVERSION="${GIT_REPO_VERSION}")
target_link_libraries(libpingus PUBLIC
logmich
tinygettext
......
0.7.6
\ No newline at end of file
Subproject commit 63d400bcd40c9c9c370c4fac067f9cf688235372
Subproject commit 115cd54cdf63567770c7b48223bf1ad2dc5aeaa7
......@@ -258,7 +258,7 @@ CoreDriver::create_scroller(const ReaderObject& reader_object, Control* parent)
if (x_axis && y_axis)
{
axis->setup(std::move(x_axis), std::move(y_axis), std::move(button));
return std::move(axis);
return axis;
}
else
{
......@@ -309,7 +309,7 @@ CoreDriver::create_scroller(const ReaderObject& reader_object, Control* parent)
std::move(down_button),
std::move(left_button),
std::move(right_button));
return std::move(scroller);
return scroller;
}
else
{
......@@ -353,7 +353,7 @@ CoreDriver::create_pointer(const ReaderObject& reader_object, Control* parent)
if (x_axis && y_axis)
{
axis->setup(std::move(x_axis), std::move(y_axis), std::move(button));
return std::move(axis);
return axis;
}
else
{
......
......@@ -59,6 +59,9 @@ public:
bottom(0)
{}
Rect(const Rect&) = default;
Rect& operator=(const Rect&) = default;
explicit Rect(const Rectf& rect);
Rect(int new_left, int new_top, int new_right, int new_bottom)
......@@ -75,13 +78,6 @@ public:
bottom(top + size.height)
{}
Rect(const Rect &rect)
: left(rect.left),
top(rect.top),
right(rect.right),
bottom(rect.bottom)
{}
Rect grow(int b) const {
return Rect(left - b,
top - b,
......
......@@ -60,10 +60,8 @@ public:
: width(width_), height(height_)
{}
Size(const Size &s)
: width(s.width),
height(s.height)
{}
Size(const Size&) = default;
Size& operator=(const Size&) = default;
explicit Size(const Sizef& s);
......
......@@ -16,6 +16,7 @@
#include "util/system.hpp"
#include <filesystem>
#include <algorithm>
#include <fstream>
#include <memory>
......@@ -36,7 +37,6 @@
# include <sys/types.h>
# include <unistd.h>
# include <errno.h>
# include <boost/filesystem.hpp>
# include <xdg.h>
#else /* WIN32 */
# include <windows.h>
......@@ -255,7 +255,7 @@ System::create_dir(std::string directory)
directory.erase(end);
}
log_info("System::create_dir: %1", directory);
if (!boost::filesystem::create_directories(directory.c_str()))
if (!std::filesystem::create_directories(directory.c_str()))
{
raise_exception(std::runtime_error, "System::create_dir: " << directory << ": " << strerror(errno));
}
......