Add -Wuseless-cast to FTXUI_DEV_WARNINGS (#728)

Add the -Wuseless-cast to the FTXUI_DEV_WARNINGS and
fix the compiler complaints about useless casts
This commit is contained in:
Stefan Ravn van Overeem
2023-08-19 11:20:04 +02:00
committed by GitHub
parent 1e6df78ec2
commit eb9a701fd7
3 changed files with 9 additions and 5 deletions

View File

@@ -82,8 +82,8 @@ class ContainerBase : public ComponentBase {
return;
}
for (size_t offset = 1; offset < children_.size(); ++offset) {
const size_t i = ((size_t(*selector_ + offset * dir + children_.size())) %
children_.size());
const size_t i =
(*selector_ + offset * dir + children_.size()) % children_.size();
if (children_[i]->Focusable()) {
*selector_ = int(i);
return;