mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
Avoid a CString copy in CFile::FType()
You guessed right, cppcheck ftw! git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1764 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@ bool CFile::IsLnk(bool bUseLstat) const { return CFile::IsLnk(m_sLongName, bUseL
|
||||
bool CFile::IsSock(bool bUseLstat) const { return CFile::IsSock(m_sLongName, bUseLstat); }
|
||||
|
||||
// for gettin file types, using fstat instead
|
||||
bool CFile::FType(const CString sFileName, EFileTypes eType, bool bUseLstat) {
|
||||
bool CFile::FType(const CString& sFileName, EFileTypes eType, bool bUseLstat) {
|
||||
struct stat st;
|
||||
|
||||
if (!bUseLstat) {
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ public:
|
||||
bool IsSock(bool bUseLstat = false) const;
|
||||
|
||||
// for gettin file types, using fstat instead
|
||||
static bool FType(const CString sFileName, EFileTypes eType, bool bUseLstat = false);
|
||||
static bool FType(const CString& sFileName, EFileTypes eType, bool bUseLstat = false);
|
||||
|
||||
enum EFileAttr {
|
||||
FA_Name,
|
||||
|
||||
Reference in New Issue
Block a user