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
parent e002a481f4
commit 9608072787
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

@ -396,6 +396,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