From: Thomas Geymayer Date: Mon, 27 Jan 2014 23:34:21 +0000 (+0100) Subject: SGPath: typo... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c54b1e037a5af5be9ef1ebc5ae0bc4bb0ee5e85b;p=simgear.git SGPath: typo... --- diff --git a/simgear/misc/path_test.cxx b/simgear/misc/path_test.cxx index 3eeccbeb..94f9eaad 100644 --- a/simgear/misc/path_test.cxx +++ b/simgear/misc/path_test.cxx @@ -192,12 +192,12 @@ int main(int argc, char* argv[]) pp.append("./test-dir/file.txt"); COMPARE(pp.create_dir(0700), -3); - pp.setPermissonChecker(&validateRead); + pp.setPermissionChecker(&validateRead); COMPARE(pp.canRead(), true); COMPARE(pp.canWrite(), false); COMPARE(pp.create_dir(0700), -3); - pp.setPermissonChecker(&validateWrite); + pp.setPermissionChecker(&validateWrite); COMPARE(pp.canRead(), false); COMPARE(pp.canWrite(), true); diff --git a/simgear/misc/sg_path.cxx b/simgear/misc/sg_path.cxx index e38c67ee..befb41a2 100644 --- a/simgear/misc/sg_path.cxx +++ b/simgear/misc/sg_path.cxx @@ -75,7 +75,7 @@ static SGPath pathForCSIDL(int csidl, const SGPath& def) char path[MAX_PATH]; if (SHGetSpecialFolderPath(0, path, csidl, false)) { - return SGPath(path, def.getPermissonChecker()); + return SGPath(path, def.getPermissionChecker()); } return def; @@ -95,7 +95,7 @@ static SGPath appleSpecialFolder(OSType type, const SGPath& def) if( FSRefMakePath(&ref, path, 1024) != noErr ) return def; - return SGPath((const char*) path, def.getPermissonChecker()); + return SGPath((const char*) path, def.getPermissionChecker()); } #else static SGPath getXDGDir( const std::string& name, @@ -131,7 +131,7 @@ static SGPath getXDGDir( const std::string& name, return SGPath::home(def) / simgear::strutils::unescape(line.substr(HOME.length())); - return SGPath(line, def.getPermissonChecker()); + return SGPath(line, def.getPermissionChecker()); } if( def.isNull() ) @@ -160,7 +160,7 @@ SGPath::fix() // default constructor -SGPath::SGPath(PermissonChecker validator) +SGPath::SGPath(PermissionChecker validator) : path(""), _permission_checker(validator), _cached(false), @@ -171,7 +171,7 @@ SGPath::SGPath(PermissonChecker validator) // create a path based on "path" -SGPath::SGPath( const std::string& p, PermissonChecker validator ) +SGPath::SGPath( const std::string& p, PermissionChecker validator ) : path(p), _permission_checker(validator), _cached(false), @@ -184,7 +184,7 @@ SGPath::SGPath( const std::string& p, PermissonChecker validator ) // create a path based on "path" and a "subpath" SGPath::SGPath( const SGPath& p, const std::string& r, - PermissonChecker validator ) + PermissionChecker validator ) : path(p.path), _permission_checker(validator), _cached(false), @@ -240,14 +240,14 @@ void SGPath::set( const string& p ) { } //------------------------------------------------------------------------------ -void SGPath::setPermissonChecker(PermissonChecker validator) +void SGPath::setPermissionChecker(PermissionChecker validator) { _permission_checker = validator; _rwCached = false; } //------------------------------------------------------------------------------ -SGPath::PermissonChecker SGPath::getPermissonChecker() const +SGPath::PermissionChecker SGPath::getPermissionChecker() const { return _permission_checker; } diff --git a/simgear/misc/sg_path.hxx b/simgear/misc/sg_path.hxx index 377a0b01..cce05ebc 100644 --- a/simgear/misc/sg_path.hxx +++ b/simgear/misc/sg_path.hxx @@ -57,10 +57,10 @@ public: bool read : 1; bool write : 1; }; - typedef Permissions (*PermissonChecker)(const SGPath&); + typedef Permissions (*PermissionChecker)(const SGPath&); /** Default constructor */ - explicit SGPath(PermissonChecker validator = NULL); + explicit SGPath(PermissionChecker validator = NULL); /** Copy contructor */ SGPath(const SGPath& p); @@ -71,7 +71,7 @@ public: * Construct a path based on the starting path provided. * @param p initial path */ - SGPath( const std::string& p, PermissonChecker validator = NULL ); + SGPath( const std::string& p, PermissionChecker validator = NULL ); /** * Construct a path based on the starting path provided and a relative subpath @@ -80,7 +80,7 @@ public: */ SGPath( const SGPath& p, const std::string& r, - PermissonChecker validator = NULL ); + PermissionChecker validator = NULL ); /** Destructor */ ~SGPath(); @@ -95,8 +95,8 @@ public: bool operator==(const SGPath& other) const; bool operator!=(const SGPath& other) const; - void setPermissonChecker(PermissonChecker validator); - PermissonChecker getPermissonChecker() const; + void setPermissionChecker(PermissionChecker validator); + PermissionChecker getPermissionChecker() const; /** * Set if file information (exists, type, mod-time) is cached or @@ -301,7 +301,7 @@ private: void checkAccess() const; std::string path; - PermissonChecker _permission_checker; + PermissionChecker _permission_checker; mutable bool _cached : 1; mutable bool _rwCached : 1;