Some cleanup to CFile

Remove CFile::SetFD() which was unused and made FD leaks way too easy.

Remove CFile::CFile(int fd, const CString& sLongName) since it's unused and
it was the only reason we needed the m_bClose member which is now also gone.

Call ClearBuffer() in Close() in case someone reuses CFile instances.

Thanks to Sebastinas.



git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1383 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-02-17 15:29:06 +00:00
parent 77e4ce400f
commit 70b60aa451
2 changed files with 4 additions and 21 deletions
-3
View File
@@ -23,7 +23,6 @@ class CFile {
public:
CFile();
CFile(const CString& sLongName);
CFile(int iFD, const CString& sLongName);
~CFile();
enum EFileTypes {
@@ -117,7 +116,6 @@ public:
CString GetLongName() const;
CString GetShortName() const;
CString GetDir() const;
void SetFD(int iFD);
private:
// flock() wrapper
@@ -129,7 +127,6 @@ private:
protected:
CString m_sLongName; //!< Absolute filename (m_sPath + "/" + m_sShortName)
CString m_sShortName; //!< Filename alone, without path
bool m_bClose;
};
class CDir : public vector<CFile*> {