diff options
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 7 | ||||
-rw-r--r-- | plugins/TabSRMM/src/contactcache.h | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 89eece1cb7..3f79b65190 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -38,7 +38,6 @@ static DBCachedContact ccInvalid; CContactCache::CContactCache(MCONTACT hContact) { m_hContact = hContact; - m_iStatus = m_iOldStatus = ID_STATUS_OFFLINE; if (hContact) { if ((cc = db_get_contact(hContact)) != nullptr) { @@ -557,7 +556,7 @@ size_t CContactCache::getMaxMessageLength() bool CContactCache::updateStatus(int iStatus) { - m_iOldStatus = m_iStatus; - m_iStatus = iStatus; - return m_iOldStatus != iStatus; + bool bRet = m_iOldStatus != iStatus; + m_iOldStatus = iStatus; + return bRet; } diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h index b322848628..cfd4ed4a9e 100644 --- a/plugins/TabSRMM/src/contactcache.h +++ b/plugins/TabSRMM/src/contactcache.h @@ -113,9 +113,7 @@ struct CContactCache : public MZeroedObject wchar_t* getNormalizedStatusMsg(const wchar_t *src, bool fStripAll = false);
HICON getIcon(int& iSize) const;
- /*
- * input history
- */
+ // input history
void saveHistory(int iHistorySize = 0);
void inputHistoryEvent(WPARAM wParam);
@@ -129,7 +127,7 @@ private: void releaseAlloced();
MCONTACT m_hContact, m_hSub;
- int m_iStatus, m_iOldStatus, m_iMetaStatus;
+ int m_iOldStatus = ID_STATUS_OFFLINE, m_iMetaStatus;
char *m_szMetaProto;
wchar_t *m_szAccount;
wchar_t m_szNick[80], m_szUIN[80];
|