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) {
|
for (SGPath p : additional_data_paths) {
|
||||||
p.append(pathSuffix);
|
p.append(pathSuffix);
|
||||||
|
|
|
@ -224,7 +224,7 @@ public:
|
||||||
* Given a path suffix (eg 'Textures' or 'AI/Traffic'), find the
|
* Given a path suffix (eg 'Textures' or 'AI/Traffic'), find the
|
||||||
* first data directory which defines it.
|
* 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; }
|
const SGPath &get_fg_home () const { return fg_home; }
|
||||||
void set_fg_home (const SGPath &home);
|
void set_fg_home (const SGPath &home);
|
||||||
|
|
|
@ -753,7 +753,7 @@ bool FGGeneric::close() {
|
||||||
void
|
void
|
||||||
FGGeneric::reinit()
|
FGGeneric::reinit()
|
||||||
{
|
{
|
||||||
SGPath path = globals->find_data_dir("Protocol/" + file_name);
|
SGPath path = globals->findDataPath("Protocol/" + file_name);
|
||||||
if (!path.exists()) {
|
if (!path.exists()) {
|
||||||
SG_LOG(SG_NETWORK, SG_WARN, "Couldn't find protocol file for '" << file_name << "'");
|
SG_LOG(SG_NETWORK, SG_WARN, "Couldn't find protocol file for '" << file_name << "'");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -776,7 +776,7 @@ static naRef f_findDataDir(naContext c, naRef me, int argc, naRef* args)
|
||||||
if(argc != 1 || !naIsString(args[0]))
|
if(argc != 1 || !naIsString(args[0]))
|
||||||
naRuntimeError(c, "bad arguments to findDataDir()");
|
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();
|
std::string pdata = p.utf8Str();
|
||||||
return naStr_fromdata(naNewString(c), const_cast<char*>(pdata.c_str()), pdata.length());
|
return naStr_fromdata(naNewString(c), const_cast<char*>(pdata.c_str()), pdata.length());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue