summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/contact.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-07-31 18:07:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-07-31 18:07:27 +0300
commit500dd4848842f6d4207584417448586d060fbd6a (patch)
tree569ac641e814da1d706d36b12eaf35183a3ce7a5 /plugins/HistoryStats/src/contact.cpp
parentb47e4b4b32698470bf52c0dc1c2d1af56c46c9b5 (diff)
Contact: group of functions gathered into the personal namespace
Diffstat (limited to 'plugins/HistoryStats/src/contact.cpp')
-rw-r--r--plugins/HistoryStats/src/contact.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/HistoryStats/src/contact.cpp b/plugins/HistoryStats/src/contact.cpp
index cd96f3c224..c6a4617c9b 100644
--- a/plugins/HistoryStats/src/contact.cpp
+++ b/plugins/HistoryStats/src/contact.cpp
@@ -5,7 +5,7 @@
#include <queue>
#include <cmath>
-Contact::Contact(Statistic* pStatistic, int nSlots, const ext::string& nick, const ext::string& protocol, const ext::string& group, int nContacts, int nSubcontacts) :
+CContact::CContact(Statistic* pStatistic, int nSlots, const ext::string& nick, const ext::string& protocol, const ext::string& group, int nContacts, int nSubcontacts) :
m_Nick(nick),
m_Protocol(protocol),
m_Group(group),
@@ -27,7 +27,7 @@ Contact::Contact(Statistic* pStatistic, int nSlots, const ext::string& nick, con
m_Slots.resize(nSlots, NULL);
}
-void Contact::updateTime(uint32_t msgTime)
+void CContact::updateTime(uint32_t msgTime)
{
if (!m_bFirstLastTimeValid) {
m_FirstTime = msgTime;
@@ -40,7 +40,7 @@ void Contact::updateTime(uint32_t msgTime)
}
}
-void Contact::updateChatDur(uint32_t timeDelta)
+void CContact::updateChatDur(uint32_t timeDelta)
{
m_bChatDurValid = true;
@@ -50,7 +50,7 @@ void Contact::updateChatDur(uint32_t timeDelta)
m_ChatDurMax = max(m_ChatDurMax, timeDelta);
}
-double Contact::getAvg(int nTotal) const
+double CContact::getAvg(int nTotal) const
{
uint32_t dwHistTime = m_pStatistic->getLastTime() - getFirstTime();
if (dwHistTime < m_pStatistic->getAverageMinTime())
@@ -59,7 +59,7 @@ double Contact::getAvg(int nTotal) const
return dwHistTime ? (0.0 + nTotal) / dwHistTime : 0.0;
}
-void Contact::addMessage(Message& msg)
+void CContact::addMessage(Message& msg)
{
if (msg.isOutgoing()) {
m_Bytes.out += msg.getLength();
@@ -73,7 +73,7 @@ void Contact::addMessage(Message& msg)
updateTime(msg.getTimestamp());
}
-void Contact::addChat(bool bOutgoing, uint32_t, uint32_t duration)
+void CContact::addChat(bool bOutgoing, uint32_t, uint32_t duration)
{
if (bOutgoing)
m_Chats.out++;
@@ -83,7 +83,7 @@ void Contact::addChat(bool bOutgoing, uint32_t, uint32_t duration)
updateChatDur(duration);
}
-void Contact::addEvent(uint16_t eventType, bool bOutgoing)
+void CContact::addEvent(uint16_t eventType, bool bOutgoing)
{
InOut* pIO = nullptr;
@@ -102,7 +102,7 @@ void Contact::addEvent(uint16_t eventType, bool bOutgoing)
pIO->in++;
}
-void Contact::merge(const Contact& other)
+void CContact::merge(const CContact& other)
{
if (m_Nick != other.m_Nick)
m_Nick = TranslateT("(multiple)");