Merge pull request #5321 from Beep6581/clut_scan_speedup
Clut scan speedup
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
#include "../rtengine/clutstore.h"
|
||||
#include "../rtengine/procparams.h"
|
||||
#define BENCHMARK
|
||||
#include "../rtengine/StopWatch.h"
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
@@ -305,6 +307,7 @@ ClutComboBox::ClutModel::ClutModel(const Glib::ustring &path)
|
||||
|
||||
int ClutComboBox::ClutModel::parseDir(const Glib::ustring& path)
|
||||
{
|
||||
BENCHFUNMICRO
|
||||
if (path.empty() || !Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) {
|
||||
return 0;
|
||||
}
|
||||
@@ -364,7 +367,7 @@ int ClutComboBox::ClutModel::parseDir(const Glib::ustring& path)
|
||||
}
|
||||
|
||||
// Fill menu structure with CLUT files
|
||||
std::set<Glib::ustring> entries;
|
||||
std::set<std::string> entries;
|
||||
|
||||
unsigned long fileCount = 0;
|
||||
|
||||
@@ -390,10 +393,10 @@ int ClutComboBox::ClutModel::parseDir(const Glib::ustring& path)
|
||||
Glib::ustring name;
|
||||
Glib::ustring extension;
|
||||
Glib::ustring profileName;
|
||||
HaldCLUT::splitClutFilename (entry, name, extension, profileName);
|
||||
HaldCLUT::splitClutFilename (entry, name, extension, profileName, false);
|
||||
|
||||
extension = extension.casefold();
|
||||
if (extension.compare("tif") != 0 && extension.compare("png") != 0) {
|
||||
if (extension != "png" && extension != "tif") {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user