diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-20 18:11:16 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-20 18:11:16 +0100 |
commit | d2e9c8ad95f8339628e4e5efbcf93d01a2f3d029 (patch) | |
tree | 2abcc1724f9c65795358a8a5136a48a0d7bee396 | |
parent | 7fb500aa62109f81efb69c32b66505efa8cfdae4 (diff) |
a
-rw-r--r-- | anim-crop-tool/main.cpp | 4 | ||||
-rw-r--r-- | compat/defs.hpp | 2 | ||||
-rw-r--r-- | editor/imgui-misc.cpp | 2 | ||||
-rw-r--r-- | src/chunk-scenery.cpp | 4 |
4 files changed, 5 insertions, 7 deletions
diff --git a/anim-crop-tool/main.cpp b/anim-crop-tool/main.cpp index 5c96de62..07a680df 100644 --- a/anim-crop-tool/main.cpp +++ b/anim-crop-tool/main.cpp @@ -77,7 +77,7 @@ image_bounds_tuple find_image_bounds(const cv::Mat4b& mat) noexcept [[nodiscard]] bool load_file(anim_group& group, options& opts, anim_atlas_& atlas, StringView filename) { - auto mat = fm_begin( + auto mat = [&]{ cv::Mat mat = cv::imread(filename, cv::IMREAD_UNCHANGED); if (mat.empty() || mat.type() != CV_8UC4) { @@ -85,7 +85,7 @@ bool load_file(anim_group& group, options& opts, anim_atlas_& atlas, StringView return cv::Mat4b{}; } return cv::Mat4b(Utility::move(mat)); - ); + }(); if (mat.empty()) return false; diff --git a/compat/defs.hpp b/compat/defs.hpp index b141eba5..edefbb5e 100644 --- a/compat/defs.hpp +++ b/compat/defs.hpp @@ -6,8 +6,6 @@ # define fm_FUNCTION_NAME __PRETTY_FUNCTION__ #endif -#define fm_begin(...) [&]{__VA_ARGS__}() - #define fm_DECLARE_DEPRECATED_COPY_ASSIGNMENT(type) \ [[deprecated, maybe_unused]] type(const type&) noexcept = default; \ [[deprecated, maybe_unused]] type& operator=(const type&) noexcept = default diff --git a/editor/imgui-misc.cpp b/editor/imgui-misc.cpp index 6ee177f8..b397945f 100644 --- a/editor/imgui-misc.cpp +++ b/editor/imgui-misc.cpp @@ -18,7 +18,7 @@ void app::draw_fps() draw.AddText(nullptr, ImGui::GetCurrentContext()->FontSize, {M->window_size()[0] - size.x - 3.5f*dpi[0], 3*dpi[1]}, ImGui::ColorConvertFloat4ToU32({0, 1, 0, 1}), buf); #if 0 - static auto timer = fm_begin( Timeline t; t.start(); return t; ); + static auto timer = []{ Timeline t; t.start(); return t; }(); if (timer.currentFrameDuration() >= 2) { timer.start(); diff --git a/src/chunk-scenery.cpp b/src/chunk-scenery.cpp index 50840453..c5b77241 100644 --- a/src/chunk-scenery.cpp +++ b/src/chunk-scenery.cpp @@ -140,12 +140,12 @@ auto chunk::ensure_scenery_mesh(scenery_scratch_buffers buffers) noexcept -> sce { _scenery_modified = false; - const auto count = fm_begin( + const auto count = [&] { size_t ret = 0; for (const auto& e : _objects) ret += !e->is_dynamic(); return ret; - ); + }(); auto& scenery_vertexes = buffers.scenery_vertexes; auto& scenery_indexes = buffers.scenery_indexes; |