diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-21 09:49:05 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-21 09:49:05 +0000 |
commit | 9b119cadd74e1343cad493e8b366e69743a620d0 (patch) | |
tree | e11d3923e86eb667f1a2f20e1126066e51ed73ce /plugins/Quotes/src/QuotesProviders.cpp | |
parent | 1b85ad91e7aa1af9d295d399e560a2adc6d413d3 (diff) |
Quotes: changed warning level to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/src/QuotesProviders.cpp')
-rw-r--r-- | plugins/Quotes/src/QuotesProviders.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Quotes/src/QuotesProviders.cpp b/plugins/Quotes/src/QuotesProviders.cpp index b8194f3cea..1c61395d55 100644 --- a/plugins/Quotes/src/QuotesProviders.cpp +++ b/plugins/Quotes/src/QuotesProviders.cpp @@ -22,7 +22,7 @@ namespace template<class T>void create_provider(CQuotesProviders::TQuotesProviders& apProviders)
{
CQuotesProviders::TQuotesProviderPtr pProvider(new T);
- if(pProvider->Init())
+ if (pProvider->Init())
{
apProviders.push_back(pProvider);
}
@@ -44,12 +44,12 @@ void CQuotesProviders::ClearProviders() namespace
{
- void convert_contact_settings(MCONTACT hContact)
+ void convert_contact_settings(MCONTACT hContact)
{
- WORD dwLogMode = db_get_w(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_LOG,static_cast<WORD>(lmDisabled));
+ WORD dwLogMode = db_get_w(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_LOG, static_cast<WORD>(lmDisabled));
if ((dwLogMode&lmInternalHistory) || (dwLogMode&lmExternalFile))
{
- db_set_b(hContact,QUOTES_PROTOCOL_NAME,DB_STR_CONTACT_SPEC_SETTINGS,1);
+ db_set_b(hContact, QUOTES_PROTOCOL_NAME, DB_STR_CONTACT_SPEC_SETTINGS, 1);
}
}
}
@@ -58,34 +58,34 @@ void CQuotesProviders::InitProviders() CreateProviders();
const WORD nCurrentVersion = 17;
- WORD nVersion = db_get_w(NULL,QUOTES_MODULE_NAME,LAST_RUN_VERSION,1);
+ WORD nVersion = db_get_w(NULL, QUOTES_MODULE_NAME, LAST_RUN_VERSION, 1);
- for(MCONTACT hContact = db_find_first(QUOTES_MODULE_NAME); hContact; hContact = db_find_next(hContact, QUOTES_MODULE_NAME))
+ for (MCONTACT hContact = db_find_first(QUOTES_MODULE_NAME); hContact; hContact = db_find_next(hContact, QUOTES_MODULE_NAME))
{
TQuotesProviderPtr pProvider = GetContactProviderPtr(hContact);
- if(pProvider)
+ if (pProvider)
{
pProvider->AddContact(hContact);
- if(nVersion < nCurrentVersion)
+ if (nVersion < nCurrentVersion)
{
convert_contact_settings(hContact);
}
}
}
- db_set_w(NULL,QUOTES_MODULE_NAME,LAST_RUN_VERSION,nCurrentVersion);
+ db_set_w(NULL, QUOTES_MODULE_NAME, LAST_RUN_VERSION, nCurrentVersion);
}
CQuotesProviders::TQuotesProviderPtr CQuotesProviders::GetContactProviderPtr(MCONTACT hContact)const
{
char* szProto = GetContactProto(hContact);
- if(NULL == szProto || 0 != ::_stricmp(szProto, QUOTES_PROTOCOL_NAME))
+ if (NULL == szProto || 0 != ::_stricmp(szProto, QUOTES_PROTOCOL_NAME))
{
return TQuotesProviderPtr();
}
- tstring sProvider = Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_PROVIDER);
- if(true == sProvider.empty())
+ tstring sProvider = Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_PROVIDER);
+ if (true == sProvider.empty())
{
return TQuotesProviderPtr();
}
@@ -96,11 +96,11 @@ CQuotesProviders::TQuotesProviderPtr CQuotesProviders::GetContactProviderPtr(MCO CQuotesProviders::TQuotesProviderPtr CQuotesProviders::FindProvider(const tstring& rsName)const
{
TQuotesProviderPtr pResult;
- for(TQuotesProviders::const_iterator i = m_apProviders.begin();i != m_apProviders.end();++i)
+ for (TQuotesProviders::const_iterator i = m_apProviders.begin(); i != m_apProviders.end(); ++i)
{
const TQuotesProviderPtr& pProvider = *i;
const IQuotesProvider::CProviderInfo& rInfo = pProvider->GetInfo();
- if(0 == ::quotes_stricmp(rsName.c_str(),rInfo.m_sName.c_str()))
+ if (0 == ::quotes_stricmp(rsName.c_str(), rInfo.m_sName.c_str()))
{
pResult = pProvider;
break;
|