From 3de70f71f309672560ceb5a0ae9ecdb17663ebe3 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sun, 8 Dec 2024 13:18:09 -0500 Subject: [PATCH] Fix for OSX build. --- scripts/coverage_reset.sh | 11 +++++++++++ scripts/reset_build.sh | 2 +- tools/designer.cpp | 5 +++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100755 scripts/coverage_reset.sh diff --git a/scripts/coverage_reset.sh b/scripts/coverage_reset.sh new file mode 100755 index 0000000..9970738 --- /dev/null +++ b/scripts/coverage_reset.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -e + +mv -f ./subprojects/packagecache . +rm -rf subprojects builddir +mkdir subprojects +mv packagecache ./subprojects/ +mkdir builddir +cp wraps/*.wrap subprojects/ +# on OSX you can't do this with static +meson setup -Db_coverage=true builddir diff --git a/scripts/reset_build.sh b/scripts/reset_build.sh index 9970738..9d56a7f 100755 --- a/scripts/reset_build.sh +++ b/scripts/reset_build.sh @@ -8,4 +8,4 @@ mv packagecache ./subprojects/ mkdir builddir cp wraps/*.wrap subprojects/ # on OSX you can't do this with static -meson setup -Db_coverage=true builddir +meson setup builddir diff --git a/tools/designer.cpp b/tools/designer.cpp index 45fce18..0208cbb 100644 --- a/tools/designer.cpp +++ b/tools/designer.cpp @@ -13,6 +13,7 @@ #include #include #include +#include using namespace fmt; using namespace ftxui; @@ -208,12 +209,12 @@ class GUI { return true; } else if(event.type == sf::Event::KeyPressed) { if(KB::isKeyPressed(KB::Up)) { - $start_char = std::max(WCHAR_MIN+1, $start_char - $font_grid.page_size()); + $start_char = std::max(wchar_t(WCHAR_MIN+1), wchar_t($start_char - $font_grid.page_size())); $font_grid.render($start_char, false); event_happened = true; $renderer.clear_cache(); } else if(KB::isKeyPressed(KB::Down)) { - $start_char = std::min(WCHAR_MAX, $start_char + $font_grid.page_size()); + $start_char = std::min(wchar_t(WCHAR_MAX), wchar_t($start_char + $font_grid.page_size())); $font_grid.render($start_char, false); $renderer.clear_cache(); } else if(KB::isKeyPressed(KB::Equal)) {