libcamera: ipa_manager: Use utils::split()
Replace the custom string splitting implementation with utils::split(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [Kieran: Re-fit to master branch] Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
53057c2a3e
commit
52774fff56
@@ -110,22 +110,13 @@ IPAManager::IPAManager()
|
||||
return;
|
||||
}
|
||||
|
||||
const char *paths = modulePaths;
|
||||
while (1) {
|
||||
const char *delim = strchrnul(paths, ':');
|
||||
size_t count = delim - paths;
|
||||
for (const auto &dir : utils::split(modulePaths, ":")) {
|
||||
if (dir.empty())
|
||||
continue;
|
||||
|
||||
if (count) {
|
||||
std::string path(paths, count);
|
||||
ret = addDir(path.c_str());
|
||||
if (ret > 0)
|
||||
ipaCount += ret;
|
||||
}
|
||||
|
||||
if (*delim == '\0')
|
||||
break;
|
||||
|
||||
paths += count + 1;
|
||||
int ret = addDir(dir.c_str());
|
||||
if (ret > 0)
|
||||
ipaCount += ret;
|
||||
}
|
||||
|
||||
if (!ipaCount)
|
||||
|
||||
Reference in New Issue
Block a user