mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Mostly:
– incorrectly identified uninitialized variables
– explicit static global variables
– const, sign and down casts and safety
– typename use
– semicolon after function implementation
– unused variables, fields, arguments and macros
– field initialization order
– exact include filename case
– redundant in code macros already defined at project level
(cherry picked from commit f7f00c631e)
Source commit: 90ad9390853aba308abe73cf02e0281238c53c87
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
//---------------------------------------------------------------------------
|
|
#ifndef ServerPathH
|
|
#define ServerPathH
|
|
//---------------------------------------------------------------------------
|
|
class CServerPath
|
|
{
|
|
public:
|
|
BOOL AddSubdir(CString subdir);
|
|
const BOOL IsEmpty() const;
|
|
CServerPath GetParent() const;
|
|
BOOL HasParent() const;
|
|
CString GetLastSegment() const;
|
|
CServerPath();
|
|
CServerPath(CString path, bool trim = true);
|
|
CServerPath(CString path, int nServerType, bool trim = true);
|
|
CServerPath(const CServerPath & path);
|
|
|
|
virtual ~CServerPath();
|
|
|
|
void SetServer(const t_server & server);
|
|
BOOL SetPath(CString & newpath, BOOL bIsFile);
|
|
BOOL SetPath(CString newpath);
|
|
const CString GetPath() const;
|
|
const CString GetPathUnterminated() const;
|
|
|
|
CServerPath & operator=(const CServerPath & op);
|
|
|
|
const bool operator==(const CServerPath & op) const;
|
|
const bool operator!=(const CServerPath & op) const;
|
|
|
|
CString FormatFilename(CString fn, bool omitPath = false) const;
|
|
|
|
protected:
|
|
BOOL m_bEmpty;
|
|
std::list<CString> m_Segments;
|
|
typedef std::list<CString>::iterator tIter;
|
|
typedef std::list<CString>::const_iterator tConstIter;
|
|
CString m_Prefix;
|
|
int m_nServerType;
|
|
|
|
private:
|
|
const CString DoGetPath(bool unterminated) const;
|
|
};
|
|
//---------------------------------------------------------------------------
|
|
#endif // ServerPathH
|