diff --git a/src/nostalgia/common/CMakeLists.txt b/src/nostalgia/common/CMakeLists.txt index b579602b2..4b4818c24 100644 --- a/src/nostalgia/common/CMakeLists.txt +++ b/src/nostalgia/common/CMakeLists.txt @@ -4,7 +4,14 @@ add_library( bounds.cpp ) -#install(TARGETS NostalgiaCommon DESTINATION lib) +install( + TARGETS + NostalgiaCommon + DESTINATION + LIBRARY DESTINATION lib/nostalgia + ARCHIVE DESTINATION lib/nostalgia +) + install( FILES bounds.hpp diff --git a/src/nostalgia/common/bounds.cpp b/src/nostalgia/common/bounds.cpp index 87b71315d..1d9539f20 100644 --- a/src/nostalgia/common/bounds.cpp +++ b/src/nostalgia/common/bounds.cpp @@ -33,11 +33,11 @@ int Bounds::y2() const noexcept { } Point Bounds::pt1() const noexcept { - return Point(x, y); + return {x, y}; } Point Bounds::pt2() const noexcept { - return Point(x2(), y2()); + return {x2(), y2()}; } } diff --git a/src/nostalgia/common/bounds.hpp b/src/nostalgia/common/bounds.hpp index bc5255da5..65aa5febb 100644 --- a/src/nostalgia/common/bounds.hpp +++ b/src/nostalgia/common/bounds.hpp @@ -48,7 +48,7 @@ class Bounds { }; template -constexpr ox::Error model(T *io, Bounds *obj) { +constexpr ox::Error model(T *io, Bounds *obj) noexcept { io->template setTypeInfo(); oxReturnError(io->field("x", &obj->x)); oxReturnError(io->field("y", &obj->y)); diff --git a/src/nostalgia/common/point.hpp b/src/nostalgia/common/point.hpp index 04233a136..fac91d663 100644 --- a/src/nostalgia/common/point.hpp +++ b/src/nostalgia/common/point.hpp @@ -187,7 +187,7 @@ constexpr bool Point::operator!=(const Point &p) const noexcept { template -constexpr ox::Error model(T *io, Point *obj) { +constexpr ox::Error model(T *io, Point *obj) noexcept { io->template setTypeInfo(); oxReturnError(io->field("x", &obj->x)); oxReturnError(io->field("y", &obj->y)); diff --git a/src/nostalgia/common/size.hpp b/src/nostalgia/common/size.hpp index 89af07125..deb00685a 100644 --- a/src/nostalgia/common/size.hpp +++ b/src/nostalgia/common/size.hpp @@ -185,7 +185,7 @@ constexpr bool Size::operator!=(const Size &p) const noexcept { template -constexpr ox::Error model(T *io, Size *obj) { +constexpr ox::Error model(T *io, Size *obj) noexcept { io->template setTypeInfo(); oxReturnError(io->field("width", &obj->width)); oxReturnError(io->field("height", &obj->height));