SGPath: make read_allowed_paths and write_allowed_paths static data members

No functional change, only a tidier organization.
This commit is contained in:
Florent Rougon 2022-08-22 22:40:31 +02:00 committed by Automatic Release Builder
parent c464a405b5
commit 7174cef8f4
2 changed files with 8 additions and 3 deletions

View File

@ -53,9 +53,10 @@
using std::string;
using simgear::strutils::starts_with;
// For SGPath::validate()
static string_list read_allowed_paths;
static string_list write_allowed_paths;
// Static data members used by SGPath::addAllowedPathPattern(),
// SGPath::validate(), etc.
string_list SGPath::read_allowed_paths;
string_list SGPath::write_allowed_paths;
/**
* define directory path separators

View File

@ -391,6 +391,10 @@ private:
mutable bool _existsCached : 1; ///< only used on Windows
mutable time_t _modTime;
mutable size_t _size;
// For addAllowedPathPattern(), validate(), etc.
static string_list read_allowed_paths;
static string_list write_allowed_paths;
};
// Other comparison operators are in the class definition block