diff options
-rw-r--r-- | src/libcamera/ipa_manager.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp index 92adc6c4..4ffbdd71 100644 --- a/src/libcamera/ipa_manager.cpp +++ b/src/libcamera/ipa_manager.cpp @@ -110,22 +110,13 @@ IPAManager::IPAManager() return; } - const char *paths = modulePaths; - while (1) { - const char *delim = strchrnul(paths, ':'); - size_t count = delim - paths; - - if (count) { - std::string path(paths, count); - ret = addDir(path.c_str()); - if (ret > 0) - ipaCount += ret; - } - - if (*delim == '\0') - break; + for (const auto &dir : utils::split(modulePaths, ":")) { + if (dir.empty()) + continue; - paths += count + 1; + int ret = addDir(dir.c_str()); + if (ret > 0) + ipaCount += ret; } if (!ipaCount) |