Improve a method name, as suggested by Florent
This commit is contained in:
parent
9e00715079
commit
73c15c4d5c
4 changed files with 4 additions and 4 deletions
|
@ -338,7 +338,7 @@ void FGGlobals::append_data_path(const SGPath& path, bool afterFGRoot)
|
|||
}
|
||||
}
|
||||
|
||||
SGPath FGGlobals::find_data_dir(const std::string& pathSuffix) const
|
||||
SGPath FGGlobals::findDataPath(const std::string& pathSuffix) const
|
||||
{
|
||||
for (SGPath p : additional_data_paths) {
|
||||
p.append(pathSuffix);
|
||||
|
|
|
@ -224,7 +224,7 @@ public:
|
|||
* Given a path suffix (eg 'Textures' or 'AI/Traffic'), find the
|
||||
* first data directory which defines it.
|
||||
*/
|
||||
SGPath find_data_dir(const std::string& pathSuffix) const;
|
||||
SGPath findDataPath(const std::string& pathSuffix) const;
|
||||
|
||||
const SGPath &get_fg_home () const { return fg_home; }
|
||||
void set_fg_home (const SGPath &home);
|
||||
|
|
|
@ -753,7 +753,7 @@ bool FGGeneric::close() {
|
|||
void
|
||||
FGGeneric::reinit()
|
||||
{
|
||||
SGPath path = globals->find_data_dir("Protocol/" + file_name);
|
||||
SGPath path = globals->findDataPath("Protocol/" + file_name);
|
||||
if (!path.exists()) {
|
||||
SG_LOG(SG_NETWORK, SG_WARN, "Couldn't find protocol file for '" << file_name << "'");
|
||||
return;
|
||||
|
|
|
@ -776,7 +776,7 @@ static naRef f_findDataDir(naContext c, naRef me, int argc, naRef* args)
|
|||
if(argc != 1 || !naIsString(args[0]))
|
||||
naRuntimeError(c, "bad arguments to findDataDir()");
|
||||
|
||||
SGPath p = globals->find_data_dir(naStr_data(args[0]));
|
||||
SGPath p = globals->findDataPath(naStr_data(args[0]));
|
||||
std::string pdata = p.utf8Str();
|
||||
return naStr_fromdata(naNewString(c), const_cast<char*>(pdata.c_str()), pdata.length());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue