summaryrefslogtreecommitdiff
path: root/protocols/CurrencyRates
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
commitcddcd7483a7c472598af098e759e5d309024f606 (patch)
treeb0a227d6e087c41958cc84d27bc323353248aae5 /protocols/CurrencyRates
parent1039b2829a264280493ba0fa979214fe024dc70c (diff)
DWORD -> uint32_t
Diffstat (limited to 'protocols/CurrencyRates')
-rw-r--r--protocols/CurrencyRates/src/CurrencyRateChart.cpp2
-rw-r--r--protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp14
-rw-r--r--protocols/CurrencyRates/src/Forex.cpp2
-rw-r--r--protocols/CurrencyRates/src/Locale.cpp3
4 files changed, 10 insertions, 11 deletions
diff --git a/protocols/CurrencyRates/src/CurrencyRateChart.cpp b/protocols/CurrencyRates/src/CurrencyRateChart.cpp
index 315a14144d..578ae7d64d 100644
--- a/protocols/CurrencyRates/src/CurrencyRateChart.cpp
+++ b/protocols/CurrencyRates/src/CurrencyRateChart.cpp
@@ -66,7 +66,7 @@ INT_PTR CurrencyRatesMenu_Chart(WPARAM wp, LPARAM /*lp*/)
if(auto hWnd = ::FindWindow(nullptr,_T("Miranda CurrencyRates Chart")))
{
COPYDATASTRUCT copydata_struct;
- copydata_struct.cbData = static_cast<DWORD>(sLogFileName.GetLength() * sizeof(TCHAR));
+ copydata_struct.cbData = static_cast<uint32_t>(sLogFileName.GetLength() * sizeof(TCHAR));
copydata_struct.lpData = const_cast<void*>(static_cast<const void*>(sLogFileName.c_str()));
copydata_struct.dwData = 0x1945;
diff --git a/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp b/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp
index 3a9b13cff5..373cbc957b 100644
--- a/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp
+++ b/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp
@@ -405,7 +405,7 @@ void log_to_history(const ICurrencyRatesProvider *pProvider, MCONTACT hContact,
DBEVENTINFO dbei = {};
dbei.szModule = MODULENAME;
- dbei.timestamp = static_cast<DWORD>(nTime);
+ dbei.timestamp = static_cast<uint32_t>(nTime);
dbei.flags = DBEF_READ | DBEF_UTF;
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.cbBlob = (int)::mir_strlen(psz) + 1;
@@ -604,7 +604,7 @@ MCONTACT CCurrencyRatesProviderBase::CreateNewContact(const CMStringW &rsName)
return hContact;
}
-DWORD get_refresh_timeout_miliseconds()
+uint32_t get_refresh_timeout_miliseconds()
{
if (!g_bAutoUpdate)
return INFINITE;
@@ -613,7 +613,7 @@ DWORD get_refresh_timeout_miliseconds()
if (nRefreshRateType < RRT_SECONDS || nRefreshRateType > RRT_HOURS)
nRefreshRateType = RRT_MINUTES;
- DWORD nTimeout = g_plugin.getWord(DB_KEY_RefreshRateValue, 1);
+ uint32_t nTimeout = g_plugin.getWord(DB_KEY_RefreshRateValue, 1);
switch (nRefreshRateType) {
default:
case RRT_SECONDS:
@@ -651,7 +651,7 @@ private:
void CCurrencyRatesProviderBase::Run()
{
- DWORD nTimeout = get_refresh_timeout_miliseconds();
+ uint32_t nTimeout = get_refresh_timeout_miliseconds();
m_sContactListFormat = g_plugin.getMStringW(DB_KEY_DisplayNameFormat, DB_DEF_DisplayNameFormat);
m_sStatusMsgFormat = g_plugin.getMStringW(DB_KEY_StatusMsgFormat, DB_DEF_StatusMsgFormat);
m_sTendencyFormat = g_plugin.getMStringW(DB_KEY_TendencyFormat, DB_DEF_TendencyFormat);
@@ -685,8 +685,8 @@ void CCurrencyRatesProviderBase::Run()
while (false == bGoToBed) {
anContacts.clear();
- DWORD dwBegin = ::GetTickCount();
- DWORD dwResult = ::WaitForMultipleObjects(COUNT_SYNC_OBJECTS, anEvents, FALSE, nTimeout);
+ uint32_t dwBegin = ::GetTickCount();
+ uint32_t dwResult = ::WaitForMultipleObjects(COUNT_SYNC_OBJECTS, anEvents, FALSE, nTimeout);
switch (dwResult) {
case WAIT_FAILED:
assert(!"WaitForMultipleObjects failed");
@@ -715,7 +715,7 @@ void CCurrencyRatesProviderBase::Run()
case WAIT_OBJECT_0 + REFRESH_CONTACT:
{
- DWORD dwTimeRest = ::GetTickCount() - dwBegin;
+ uint32_t dwTimeRest = ::GetTickCount() - dwBegin;
if (INFINITE != nTimeout && dwTimeRest < nTimeout)
nTimeout -= dwTimeRest;
diff --git a/protocols/CurrencyRates/src/Forex.cpp b/protocols/CurrencyRates/src/Forex.cpp
index 3395c1e999..f36ecad292 100644
--- a/protocols/CurrencyRates/src/Forex.cpp
+++ b/protocols/CurrencyRates/src/Forex.cpp
@@ -230,7 +230,7 @@ void WaitForWorkingThreads()
size_t cThreads = g_ahThreads.size();
if (cThreads > 0) {
HANDLE* paHandles = &*(g_ahThreads.begin());
- ::WaitForMultipleObjects((DWORD)cThreads, paHandles, TRUE, INFINITE);
+ ::WaitForMultipleObjects((uint32_t)cThreads, paHandles, TRUE, INFINITE);
}
}
diff --git a/protocols/CurrencyRates/src/Locale.cpp b/protocols/CurrencyRates/src/Locale.cpp
index 758773233c..c91e9af5e6 100644
--- a/protocols/CurrencyRates/src/Locale.cpp
+++ b/protocols/CurrencyRates/src/Locale.cpp
@@ -12,8 +12,7 @@ static CMStringW get_int_registry_value(LPCTSTR pszValueName)
LONG lResult = ::RegOpenKeyEx(HKEY_CURRENT_USER,
L"Control Panel\\International", 0, KEY_QUERY_VALUE, &hKey);
if ((ERROR_SUCCESS == lResult) && (nullptr != hKey)) {
- DWORD dwType = 0;
- DWORD dwSize = 0;
+ DWORD dwType = 0, dwSize = 0;
lResult = ::RegQueryValueEx(hKey, pszValueName, nullptr, &dwType, nullptr, &dwSize);
if ((ERROR_SUCCESS == lResult) && ((REG_SZ == dwType) || (REG_EXPAND_SZ == dwType))) {
sResult.Truncate(dwSize);