Fix few errors on cygwin.

I hate timeval...

Thanks to Lizzy Eilson for reporting this.
This commit is contained in:
Alexey Sokolov
2012-08-19 15:25:09 +07:00
parent b2fa3a7f61
commit b77e697273
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -21,7 +21,7 @@ class CClient;
class CBufLine {
public:
CBufLine() { throw 0; } // shouldn't be called, but is needed for compilation
CBufLine(const CString& sFormat, const CString& sText = "", const timeval* ts = 0);
CBufLine(const CString& sFormat, const CString& sText = "", const struct timeval* ts = 0);
~CBufLine();
CString GetLine(const CClient& Client, const MCString& msParams) const;
void UpdateTime();
@@ -29,20 +29,20 @@ public:
// Setters
void SetFormat(const CString& sFormat) { m_sFormat = sFormat; }
void SetText(const CString& sText) { m_sText = sText; }
void SetTime(const timeval& ts) { m_time = ts; }
void SetTime(const struct timeval& ts) { m_time = ts; }
// !Setters
// Getters
const CString& GetFormat() const { return m_sFormat; }
const CString& GetText() const { return m_sText; }
timeval GetTime() const { return m_time; }
struct timeval GetTime() const { return m_time; }
// !Getters
private:
protected:
CString m_sFormat;
CString m_sText;
timeval m_time;
struct timeval m_time;
};
class CBuffer : private std::deque<CBufLine> {
@@ -50,7 +50,7 @@ public:
CBuffer(unsigned int uLineCount = 100);
~CBuffer();
size_type AddLine(const CString& sFormat, const CString& sText = "", const timeval* ts = 0);
size_type AddLine(const CString& sFormat, const CString& sText = "", const struct timeval* ts = 0);
/// Same as AddLine, but replaces a line whose format string starts with sMatch if there is one.
size_type UpdateLine(const CString& sMatch, const CString& sFormat, const CString& sText = "");
/// Same as UpdateLine, but does nothing if this exact line already exists.
+1 -1
View File
@@ -85,7 +85,7 @@ public:
const CBuffer& GetBuffer() const { return m_Buffer; }
unsigned int GetBufferCount() const { return m_Buffer.GetLineCount(); }
bool SetBufferCount(unsigned int u, bool bForce = false) { return m_Buffer.SetLineCount(u, bForce); };
size_t AddBuffer(const CString& sFormat, const CString& sText = "", const timeval* ts = NULL) { return m_Buffer.AddLine(sFormat, sText, ts); }
size_t AddBuffer(const CString& sFormat, const CString& sText = "", const struct timeval* ts = NULL) { return m_Buffer.AddLine(sFormat, sText, ts); }
void ClearBuffer() { m_Buffer.Clear(); }
void SendBuffer(CClient* pClient);
// !Buffer