D12222: baloodb: Use complete access filtering for all outputs
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Mon Apr 16 17:06:09 UTC 2018
bruns added inline comments.
INLINE COMMENTS
> databasesanitizer.cpp:252
> + auto& summary = listResult.second;
> for (const auto& info: listResult.first) {
> + if (ignoredDevices[info.id] == false) {
If ignoredDevices is a Set/List, you can do a filter pass over the fileList first.
auto& fileList = listResult.first;
auto tail = fileList.end();
for (auto deviceId : ignoredDevices) {
tail = std::remove_if(fileList.begin(), tail,
[deviceId] (const FileInfo& info) {
return info.id == deviceId;
});
}
summary.ignored += fileList.end() - tail;
std::erase(tail, fileList.end());
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D12222
To: michaelh, #baloo, #frameworks
Cc: bruns, ashaposhnikov, michaelh, astippich, spoorun, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180416/f21f50b7/attachment.html>
More information about the Kde-frameworks-devel
mailing list