From 8fdd9a15c4ed609044b6eb2a60331a2d3aebd03d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 23 Aug 2019 12:26:11 -0400 Subject: [PATCH] Connection: Collapse VertInBank into std::any_of Same thing, single line. --- hecl/lib/Blender/Connection.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hecl/lib/Blender/Connection.cpp b/hecl/lib/Blender/Connection.cpp index bbde2c147..c910746b6 100644 --- a/hecl/lib/Blender/Connection.cpp +++ b/hecl/lib/Blender/Connection.cpp @@ -1012,10 +1012,7 @@ bool Mesh::Surface::Vert::operator==(const Vert& other) const { } static bool VertInBank(const std::vector& bank, uint32_t sIdx) { - for (uint32_t idx : bank) - if (sIdx == idx) - return true; - return false; + return std::any_of(bank.cbegin(), bank.cend(), [sIdx](auto index) { return index == sIdx; }); } void Mesh::SkinBanks::Bank::addSkins(const Mesh& parent, const std::vector& skinIdxs) {