[nostalgia/core/studio] Put TileSheetEditor draw command in UndoCommand

This commit is contained in:
2022-02-13 23:23:59 -06:00
parent 4f69f027ef
commit d792e4c515
7 changed files with 123 additions and 43 deletions
+4 -4
View File
@@ -28,7 +28,7 @@ struct AssetContainer {
public:
template<class... Args>
explicit AssetContainer(Args&&... args): m_obj(ox::forward<Args>(args)...) {
explicit constexpr AssetContainer(Args&&... args): m_obj(ox::forward<Args>(args)...) {
}
constexpr T *get() noexcept {
@@ -60,17 +60,17 @@ class AssetRef {
const AssetContainer<T> *m_ctr = nullptr;
public:
explicit AssetRef(const AssetContainer<T> *c = nullptr) noexcept: m_ctr(c) {
explicit constexpr AssetRef(const AssetContainer<T> *c = nullptr) noexcept: m_ctr(c) {
}
AssetRef(const AssetRef &h) noexcept {
constexpr AssetRef(const AssetRef &h) noexcept {
m_ctr = h.m_ctr;
if (m_ctr) {
m_ctr->incRefs();
}
}
AssetRef(AssetRef &&h) noexcept {
constexpr AssetRef(AssetRef &&h) noexcept {
m_ctr = h.m_ctr;
h.m_ctr = nullptr;
}