diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-07-21 22:19:53 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-07-21 22:19:53 +0000 |
| commit | 34d08da015358e09229ebd7f01744432901bdc47 (patch) | |
| tree | 5766107cc843557a0fab0c9bda889311ba41d9fc /src/io | |
| parent | Fixing some icons dont redraw (diff) | |
| download | inkscape-34d08da015358e09229ebd7f01744432901bdc47.tar.gz inkscape-34d08da015358e09229ebd7f01744432901bdc47.zip | |
Fixing coding style
Diffstat (limited to 'src/io')
| -rw-r--r-- | src/io/resource.cpp | 13 | ||||
| -rw-r--r-- | src/io/resource.h | 14 |
2 files changed, 12 insertions, 15 deletions
diff --git a/src/io/resource.cpp b/src/io/resource.cpp index 127b92b76..65fd01d0e 100644 --- a/src/io/resource.cpp +++ b/src/io/resource.cpp @@ -318,27 +318,28 @@ void get_filenames_from_path(std::vector<Glib::ustring> &files, Glib::ustring pa * path - The directory to parse, will add nothing if directory doesn't exist * exclusions - Exclude files that exactly match these names. */ -void get_foldernames_from_path(std::vector<Glib::ustring> &folders, Glib::ustring path, std::vector<const char *> exclusions) +void get_foldernames_from_path(std::vector<Glib::ustring> &folders, Glib::ustring path, + std::vector<const char *> exclusions) { - if(!Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) { + if (!Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) { return; } Glib::Dir dir(path); std::string file = dir.read_name(); - while (!file.empty()){ + while (!file.empty()) { // If not extensions are specified, don't reject ANY files. bool reject = false; // Reject any file which matches the exclusions. - for (auto &exc: exclusions) { - reject |= Glib::str_has_prefix(file, exc); + for (auto &exc : exclusions) { + reject |= Glib::str_has_prefix(file, exc); } // Reject any filename which isn't a regular file Glib::ustring filename = Glib::build_filename(path, file); - if(Glib::file_test(filename, Glib::FILE_TEST_IS_DIR) && !reject) { + if (Glib::file_test(filename, Glib::FILE_TEST_IS_DIR) && !reject) { folders.push_back(filename); } file = dir.read_name(); diff --git a/src/io/resource.h b/src/io/resource.h index f70e55447..d86eda51a 100644 --- a/src/io/resource.h +++ b/src/io/resource.h @@ -79,23 +79,19 @@ std::vector<Glib::ustring> get_filenames(Glib::ustring path, std::vector<const char *> extensions={}, std::vector<const char *> exclusions={}); -std::vector<Glib::ustring> get_foldernames(Type type, - std::vector<const char *> exclusions={}); +std::vector<Glib::ustring> get_foldernames(Type type, std::vector<const char *> exclusions = {}); -std::vector<Glib::ustring> get_foldernames(Domain domain, Type type, - std::vector<const char *> exclusions={}); +std::vector<Glib::ustring> get_foldernames(Domain domain, Type type, std::vector<const char *> exclusions = {}); -std::vector<Glib::ustring> get_foldernames(Glib::ustring path, - std::vector<const char *> exclusions={}); +std::vector<Glib::ustring> get_foldernames(Glib::ustring path, std::vector<const char *> exclusions = {}); void get_filenames_from_path(std::vector<Glib::ustring> &files, Glib::ustring path, std::vector<const char *> extensions={}, std::vector<const char *> exclusions={}); -void get_foldernames_from_path(std::vector<Glib::ustring> &files, - Glib::ustring path, - std::vector<const char *> exclusions={}); +void get_foldernames_from_path(std::vector<Glib::ustring> &files, Glib::ustring path, + std::vector<const char *> exclusions = {}); char *profile_path(const char *filename); |
