Simplify findFiles
In this repo there is no need for a recursive iterator,
fix style and make it a standard iterator.
Change-Id: I076c71f6b0baa4dc4b478b972bdb2fb6086d3ce6
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index 6b12ab6..d5ddb69 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -111,8 +111,8 @@
const std::vector<std::experimental::filesystem::path> &i2cDevsBefore)
{
std::vector<std::experimental::filesystem::path> i2cDevsAfter;
- find_files(std::experimental::filesystem::path(I2C_DEVS_DIR),
- R"(i2c-\d+)", i2cDevsAfter, 0);
+ findFiles(std::experimental::filesystem::path(I2C_DEVS_DIR),
+ R"(i2c-\d+)", i2cDevsAfter);
for (const auto &dev : i2cDevsAfter)
{
@@ -222,8 +222,8 @@
auto findMux = MUX_TYPES.find(type);
if (findMux != MUX_TYPES.end())
{
- find_files(std::experimental::filesystem::path(I2C_DEVS_DIR),
- R"(i2c-\d+)", i2cDevsBefore, 0);
+ findFiles(std::experimental::filesystem::path(I2C_DEVS_DIR),
+ R"(i2c-\d+)", i2cDevsBefore);
}
// compile dtbo and load overlay
@@ -257,8 +257,8 @@
{
std::vector<std::experimental::filesystem::path> paths;
- if (!find_files(std::experimental::filesystem::path(TEMPLATE_DIR),
- R"(.*\.template)", paths, 0))
+ if (!findFiles(std::experimental::filesystem::path(TEMPLATE_DIR),
+ R"(.*\.template)", paths))
{
std::cerr << "Unable to find any tempate files in " << TEMPLATE_DIR
<< "\n";