Formatting.

This commit is contained in:
Jeff Young 2020-12-13 11:26:26 +00:00
parent 1db7ffad5e
commit e32686a80b
2 changed files with 14 additions and 15 deletions

View File

@ -22,9 +22,8 @@
#include <env_paths.h> #include <env_paths.h>
static bool normalizeAbsolutePaths( const wxFileName& aPathA, static bool normalizeAbsolutePaths( const wxFileName& aPathA, const wxFileName& aPathB,
const wxFileName& aPathB, wxString* aResultPath )
wxString* aResultPath )
{ {
wxCHECK_MSG( aPathA.IsAbsolute(), false, aPathA.GetPath() + " is not an absolute path." ); wxCHECK_MSG( aPathA.IsAbsolute(), false, aPathA.GetPath() + " is not an absolute path." );
wxCHECK_MSG( aPathB.IsAbsolute(), false, aPathB.GetPath() + " is not an absolute path." ); wxCHECK_MSG( aPathB.IsAbsolute(), false, aPathB.GetPath() + " is not an absolute path." );
@ -66,7 +65,7 @@ static bool normalizeAbsolutePaths( const wxFileName& aPathA,
wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars, wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars,
const wxString& aProjectPath ) const wxString& aProjectPath )
{ {
wxFileName envPath; wxFileName envPath;
wxString varName; wxString varName;
@ -125,12 +124,12 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars, wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars,
const PROJECT* aProject ) const PROJECT* aProject )
{ {
if( aProject ) if( aProject )
return NormalizePath( aFilePath, aEnvVars, aProject->GetProjectPath() ); return NormalizePath( aFilePath, aEnvVars, aProject->GetProjectPath() );
else else
return NormalizePath( aFilePath, aEnvVars, "" ); return NormalizePath( aFilePath, aEnvVars, "" );
} }
@ -149,7 +148,7 @@ static wxString createFilePath( const wxString& aPath, const wxString& aFileName
wxString ResolveFile( const wxString& aFileName, const ENV_VAR_MAP* aEnvVars, wxString ResolveFile( const wxString& aFileName, const ENV_VAR_MAP* aEnvVars,
const PROJECT* aProject ) const PROJECT* aProject )
{ {
wxFileName full( aFileName ); wxFileName full( aFileName );

View File

@ -37,7 +37,7 @@
* path could not be normalized. * path could not be normalized.
*/ */
wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars, wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars,
const PROJECT* aProject ); const PROJECT* aProject );
/** /**
* Normalizes a file path to an environmental variable, if possible. * Normalizes a file path to an environmental variable, if possible.
@ -48,8 +48,8 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
* @return Normalized full file path (path and file name) if succeeded or empty string if the * @return Normalized full file path (path and file name) if succeeded or empty string if the
* path could not be normalized. * path could not be normalized.
*/ */
wxString NormalizePath( wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars,
const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars, const wxString& aProjectPath ); const wxString& aProjectPath );
/** /**
* Searches the default paths trying to find one with the requested file. * Searches the default paths trying to find one with the requested file.
@ -60,8 +60,8 @@ wxString NormalizePath(
* @return Full path (apth and file name) if the file was found in one of the paths, otherwise * @return Full path (apth and file name) if the file was found in one of the paths, otherwise
* an empty string. * an empty string.
*/ */
wxString ResolveFile( wxString ResolveFile( const wxString& aFileName, const ENV_VAR_MAP* aEnvVars,
const wxString& aFileName, const ENV_VAR_MAP* aEnvVars, const PROJECT* aProject ); const PROJECT* aProject );
/** /**
* Checks if a given filename is within a given project directory (not whether it exists!) * Checks if a given filename is within a given project directory (not whether it exists!)