diff --git a/Common/Cpp/MoveOnlyFunction_Tests.cpp b/Common/Cpp/MoveOnlyFunction_Tests.cpp index c133e8b8ec..72ed5998ae 100644 --- a/Common/Cpp/MoveOnlyFunction_Tests.cpp +++ b/Common/Cpp/MoveOnlyFunction_Tests.cpp @@ -21,7 +21,6 @@ namespace{ static_assert(!std::is_copy_constructible_v>); static_assert(!std::is_copy_assignable_v>); static_assert(std::is_nothrow_move_constructible_v>); -static_assert(std::is_nothrow_move_assignable_v>); diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStoryTools.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStoryTools.cpp index da3f7704b3..f2a1bfe6cf 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStoryTools.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStoryTools.cpp @@ -1483,10 +1483,13 @@ size_t bag_clear_tab_count(const ImageViewRGB32& frame){ for (size_t bx = 0; bx < badge.width(); bx++){ const uint32_t pixel = badge.pixel(bx, y); int rr = (pixel >> 16) & 255, gg = (pixel >> 8) & 255, bb = pixel & 255; - red += rr > 150 && rr > gg + 60 && rr > bb + 60; + if (rr > 150 && rr > gg + 60 && rr > bb + 60){ + red++; + } } } - if (badge.width() * badge.height() && (double)red / (badge.width() * badge.height()) > .45){ + const size_t badge_area = badge.width() * badge.height(); + if (badge_area > 0 && (double)red / badge_area > .45){ continue; } const ImageFloatBox box{x, .06, .038, .072}; diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Tests.cpp index c261f8ff19..5f3efbe0da 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Tests.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Tests.cpp @@ -4,6 +4,7 @@ * */ +#include #include #include "Common/Cpp/Exceptions.h" #include "Common/Cpp/Filesystem/Filesystem.h"