summaryrefslogtreecommitdiff
path: root/plugins/Quotes
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Quotes')
-rw-r--r--plugins/Quotes/CurrencyConverter.cpp6
-rw-r--r--plugins/Quotes/Forex.cpp10
-rw-r--r--plugins/Quotes/HTTPSession.cpp10
-rw-r--r--plugins/Quotes/IHTMLEngine.h2
-rw-r--r--plugins/Quotes/IHTMLParser.h8
-rw-r--r--plugins/Quotes/IQuotesProvider.h4
-rw-r--r--plugins/Quotes/IXMLEngine.h8
-rw-r--r--plugins/Quotes/IconLib.cpp2
-rw-r--r--plugins/Quotes/ImportExport.cpp10
-rw-r--r--plugins/Quotes/IsWithinAccuracy.h2
-rw-r--r--plugins/Quotes/Locale.cpp4
-rw-r--r--plugins/Quotes/ModuleInfo.cpp12
-rw-r--r--plugins/Quotes/QuoteChart.cpp2
-rw-r--r--plugins/Quotes/QuoteInfoDlg.cpp4
-rw-r--r--plugins/Quotes/QuotesProviderFinance.cpp6
-rw-r--r--plugins/Quotes/QuotesProviderGoogle.cpp26
-rw-r--r--plugins/Quotes/QuotesProviderGoogleFinance.cpp8
-rw-r--r--plugins/Quotes/QuotesProviderVisitor.h4
-rw-r--r--plugins/Quotes/QuotesProviderYahoo.cpp12
-rw-r--r--plugins/Quotes/QuotesProviders.cpp2
-rw-r--r--plugins/Quotes/SettingsDlg.cpp14
-rw-r--r--plugins/Quotes/XMLEngineMI.cpp2
22 files changed, 79 insertions, 79 deletions
diff --git a/plugins/Quotes/CurrencyConverter.cpp b/plugins/Quotes/CurrencyConverter.cpp
index 946901dd29..0e04d2562e 100644
--- a/plugins/Quotes/CurrencyConverter.cpp
+++ b/plugins/Quotes/CurrencyConverter.cpp
@@ -212,17 +212,17 @@ namespace
tstring sText = get_window_text(hwndAmount);
double dAmount = 1.0;
- if((true == str2double(sText,dAmount)) && (dAmount > 0.0))
+ if ((true == str2double(sText,dAmount)) && (dAmount > 0.0))
{
Quotes_DBWriteDouble(NULL,QUOTES_MODULE_NAME,DB_STR_CC_AMOUNT,dAmount);
size_t nFrom = static_cast<size_t>(::SendMessage(::GetDlgItem(hDlg,IDC_COMBO_CONVERT_FROM),CB_GETCURSEL,0,0));
size_t nTo = static_cast<size_t>(::SendMessage(::GetDlgItem(hDlg,IDC_COMBO_CONVERT_INTO),CB_GETCURSEL,0,0));
- if((CB_ERR != nFrom) && (CB_ERR != nTo) && (nFrom != nTo))
+ if ((CB_ERR != nFrom) && (CB_ERR != nTo) && (nFrom != nTo))
{
const CQuotesProviderGoogle::CQuoteSection& rSection = get_quotes();
size_t cQuotes = rSection.GetQuoteCount();
- if((nFrom < cQuotes) && (nTo < cQuotes))
+ if ((nFrom < cQuotes) && (nTo < cQuotes))
{
CQuotesProviderGoogle::CRateInfo ri;
CQuotesProviderGoogle::CQuote from = rSection.GetQuote(nFrom);
diff --git a/plugins/Quotes/Forex.cpp b/plugins/Quotes/Forex.cpp
index a661958302..d99d2aa952 100644
--- a/plugins/Quotes/Forex.cpp
+++ b/plugins/Quotes/Forex.cpp
@@ -292,18 +292,18 @@ namespace
INT_PTR QuoteProtoFunc_SetStatus(WPARAM wp,LPARAM /*lp*/)
{
int nStatus = wp;
- if((ID_STATUS_ONLINE == nStatus) || (ID_STATUS_OFFLINE == nStatus))
+ if ((ID_STATUS_ONLINE == nStatus) || (ID_STATUS_OFFLINE == nStatus))
{
int nOldStatus = g_nStatus;
if(nStatus != g_nStatus)
{
g_nStatus = nStatus;
- if((ID_STATUS_ONLINE == nOldStatus) && (ID_STATUS_OFFLINE == g_nStatus))
+ if ((ID_STATUS_ONLINE == nOldStatus) && (ID_STATUS_OFFLINE == g_nStatus))
{
BOOL b = ::SetEvent(g_hEventWorkThreadStop);
assert(b);
}
- else if((ID_STATUS_ONLINE == g_nStatus) && (ID_STATUS_OFFLINE == nOldStatus))
+ else if ((ID_STATUS_ONLINE == g_nStatus) && (ID_STATUS_OFFLINE == nOldStatus))
{
BOOL b = ::ResetEvent(g_hEventWorkThreadStop);
assert(b && "Failed to reset event");
@@ -370,7 +370,7 @@ namespace
INT_PTR QuoteProtoFunc_LoadIcon(WPARAM wp,LPARAM /*lp*/)
{
- if((wp & 0xffff) == PLI_PROTOCOL)
+ if ((wp & 0xffff) == PLI_PROTOCOL)
{
return reinterpret_cast<int>(::CopyIcon(Quotes_LoadIconEx(ICON_STR_MAIN)));
}
@@ -459,7 +459,7 @@ extern "C"
mir_getMMI(&mmi);
mir_getUTFI(&utfi);
mir_getLP(&Global_pluginInfo);
-// if((mirandaVersion >= 0x0800) && (1 == mir_getXI(&xi)))
+// if ((mirandaVersion >= 0x0800) && (1 == mir_getXI(&xi)))
// {
// CModuleInfo::SetXMLEnginePtr(CModuleInfo::TXMLEnginePtr(new CXMLEngineMI));
// }
diff --git a/plugins/Quotes/HTTPSession.cpp b/plugins/Quotes/HTTPSession.cpp
index 837be0de0a..aa66948ae9 100644
--- a/plugins/Quotes/HTTPSession.cpp
+++ b/plugins/Quotes/HTTPSession.cpp
@@ -6,8 +6,8 @@
class CHTTPSession::CImpl
{
public:
- CImpl(){}
- virtual ~CImpl(){}
+ CImpl() {}
+ virtual ~CImpl() {}
virtual bool OpenURL(const tstring& rsURL) = 0;
virtual bool ReadResponce(tstring& rsResponce)const = 0;
@@ -112,7 +112,7 @@ namespace
class CImplMI : public CHTTPSession::CImpl
{
public:
- CImplMI(){}
+ CImplMI() {}
static bool Init()
{
@@ -182,7 +182,7 @@ namespace
if(pReply)
{
- if((200 == pReply->resultCode) && (pReply->dataLength > 0))
+ if ((200 == pReply->resultCode) && (pReply->dataLength > 0))
{
TBuffer apBuffer;
apBuffer.insert(apBuffer.begin(),pReply->pData,pReply->pData+pReply->dataLength);
@@ -190,7 +190,7 @@ namespace
char* pResult = &*(apBuffer.begin());
int nIndex = find_header(pReply,"Content-Type");
- if((-1 != nIndex) && (NULL != strstr(_strlwr(pReply->headers[nIndex].szValue),"utf-8")))
+ if ((-1 != nIndex) && (NULL != strstr(_strlwr(pReply->headers[nIndex].szValue),"utf-8")))
{
TCHAR* p = mir_utf8decodeT(pResult);
rsResponce = p;
diff --git a/plugins/Quotes/IHTMLEngine.h b/plugins/Quotes/IHTMLEngine.h
index 8fe54d5ec5..7df3074d3e 100644
--- a/plugins/Quotes/IHTMLEngine.h
+++ b/plugins/Quotes/IHTMLEngine.h
@@ -10,7 +10,7 @@ public:
public:
IHTMLEngine(void){}
- virtual ~IHTMLEngine(){}
+ virtual ~IHTMLEngine() {}
virtual THTMLParserPtr GetParserPtr()const = 0;
};
diff --git a/plugins/Quotes/IHTMLParser.h b/plugins/Quotes/IHTMLParser.h
index 2b124b0f6c..defc6f61cb 100644
--- a/plugins/Quotes/IHTMLParser.h
+++ b/plugins/Quotes/IHTMLParser.h
@@ -14,8 +14,8 @@ public:
};
public:
- IHTMLNode(){}
- virtual ~IHTMLNode(){}
+ IHTMLNode() {}
+ virtual ~IHTMLNode() {}
virtual size_t GetChildCount()const = 0;
virtual THTMLNodePtr GetChildPtr(size_t nIndex) = 0;
@@ -32,8 +32,8 @@ class IHTMLParser
public:
typedef IHTMLNode::THTMLNodePtr THTMLNodePtr;
public:
- IHTMLParser(){}
- virtual ~IHTMLParser(){}
+ IHTMLParser() {}
+ virtual ~IHTMLParser() {}
virtual THTMLNodePtr ParseString(const tstring& rsHTML) = 0;
};
diff --git a/plugins/Quotes/IQuotesProvider.h b/plugins/Quotes/IQuotesProvider.h
index d0d4197023..a03a2a9bcd 100644
--- a/plugins/Quotes/IQuotesProvider.h
+++ b/plugins/Quotes/IQuotesProvider.h
@@ -19,8 +19,8 @@ public:
};
public:
- IQuotesProvider(){}
- virtual ~IQuotesProvider(){}
+ IQuotesProvider() {}
+ virtual ~IQuotesProvider() {}
virtual bool Init() = 0;
virtual const CProviderInfo& GetInfo()const = 0;
diff --git a/plugins/Quotes/IXMLEngine.h b/plugins/Quotes/IXMLEngine.h
index e20fc0e64e..910c3efea0 100644
--- a/plugins/Quotes/IXMLEngine.h
+++ b/plugins/Quotes/IXMLEngine.h
@@ -7,8 +7,8 @@ public:
typedef boost::shared_ptr<IXMLNode> TXMLNodePtr;
public:
- IXMLNode(){}
- virtual ~IXMLNode(){}
+ IXMLNode() {}
+ virtual ~IXMLNode() {}
virtual size_t GetChildCount()const = 0;
virtual TXMLNodePtr GetChildNode(size_t nIndex)const = 0;
@@ -31,9 +31,9 @@ inline tostream& operator<<(tostream& o,const IXMLNode& node)
class IXMLEngine
{
public:
- IXMLEngine(){}
+ IXMLEngine() {}
- virtual ~IXMLEngine(){}
+ virtual ~IXMLEngine() {}
virtual IXMLNode::TXMLNodePtr LoadFile(const tstring& rsFileName)const = 0;
virtual bool SaveFile(const tstring& rsFileName,const IXMLNode::TXMLNodePtr& pNode)const = 0;
diff --git a/plugins/Quotes/IconLib.cpp b/plugins/Quotes/IconLib.cpp
index 2c7a3de436..9702bfe3d8 100644
--- a/plugins/Quotes/IconLib.cpp
+++ b/plugins/Quotes/IconLib.cpp
@@ -56,7 +56,7 @@ void Quotes_IconsInit()
// TCHAR* szRootSection = TranslateTS(A2T(QUOTES_PROTOCOL_NAME));
- for( int i = 0; i < SIZEOF(iconList); i++ )
+ for ( int i = 0; i < SIZEOF(iconList); i++ )
{
// char szSettingName[100];
// TCHAR szSectionName[100];
diff --git a/plugins/Quotes/ImportExport.cpp b/plugins/Quotes/ImportExport.cpp
index 1fba49ba28..2e38be0c0f 100644
--- a/plugins/Quotes/ImportExport.cpp
+++ b/plugins/Quotes/ImportExport.cpp
@@ -381,7 +381,7 @@ namespace
}
}
- if((false == sName.empty()) && (false == sType.empty()))
+ if ((false == sName.empty()) && (false == sType.empty()))
{
std::string s = quotes_t2a(sName.c_str());
dbs.szSetting = s.c_str();//T2CA(sName.c_str());
@@ -475,7 +475,7 @@ namespace
}
}
- if((true == bCListModule) && (0 == quotes_stricmp(sName.c_str(),_T("Group"))))
+ if ((true == bCListModule) && (0 == quotes_stricmp(sName.c_str(),_T("Group"))))
{
CallService(MS_CLIST_GROUPCREATE,NULL,reinterpret_cast<LPARAM>(sValue.c_str()));
}
@@ -546,7 +546,7 @@ namespace
{
IXMLNode::TXMLNodePtr pNode = pXmlContact->GetChildNode(i);
tstring sName = pNode->GetName();
- if((0 == quotes_stricmp(g_pszXmlModule,sName.c_str()))
+ if ((0 == quotes_stricmp(g_pszXmlModule,sName.c_str()))
&& (0 == quotes_stricmp(g_sQuotes.c_str(),pNode->GetText().c_str())))
{
return pNode;
@@ -593,7 +593,7 @@ namespace
if(pXMLSetting && (0 == quotes_stricmp(g_pszXmlSetting,pXMLSetting->GetName().c_str())))
{
TNameValue Item = parse_setting_node(pXMLSetting);
- if((0 == quotes_stricmp(g_sQuotesProvider.c_str(),Item.first.c_str())) && (false == Item.second.empty()))
+ if ((0 == quotes_stricmp(g_sQuotesProvider.c_str(),Item.first.c_str())) && (false == Item.second.empty()))
{
return CModuleInfo::GetInstance().GetQuoteProvidersPtr()->FindProvider(Item.second);
}
@@ -649,7 +649,7 @@ namespace
}
}
- if((false == sFromID.empty()) && (false == sToID.empty()))
+ if ((false == sFromID.empty()) && (false == sToID.empty()))
{
m_hContact = rProvider.GetContactByID(sFromID,sToID);
}
diff --git a/plugins/Quotes/IsWithinAccuracy.h b/plugins/Quotes/IsWithinAccuracy.h
index 708c101a27..5e39281719 100644
--- a/plugins/Quotes/IsWithinAccuracy.h
+++ b/plugins/Quotes/IsWithinAccuracy.h
@@ -5,7 +5,7 @@ inline bool IsWithinAccuracy(double dValue1, double dValue2, double dAccuracy =
{
double dDifference = dValue1 - dValue2 ;
- if((-dAccuracy <= dDifference) && (dDifference <= dAccuracy))
+ if ((-dAccuracy <= dDifference) && (dDifference <= dAccuracy))
return true ;
else
return false ;
diff --git a/plugins/Quotes/Locale.cpp b/plugins/Quotes/Locale.cpp
index 66c9cf5c14..c01f67148a 100644
--- a/plugins/Quotes/Locale.cpp
+++ b/plugins/Quotes/Locale.cpp
@@ -14,12 +14,12 @@ namespace
HKEY hKey = NULL;
LONG lResult = ::RegOpenKeyEx(HKEY_CURRENT_USER,
_T("Control Panel\\International"),0,KEY_QUERY_VALUE,&hKey);
- if((ERROR_SUCCESS == lResult) && (NULL != hKey))
+ if ((ERROR_SUCCESS == lResult) && (NULL != hKey))
{
DWORD dwType = 0;
DWORD dwSize = 0;
lResult = ::RegQueryValueEx(hKey,pszValueName,nullptr,&dwType,nullptr,&dwSize);
- if((ERROR_SUCCESS == lResult) && ((REG_SZ == dwType) || (REG_EXPAND_SZ == dwType)))
+ if ((ERROR_SUCCESS == lResult) && ((REG_SZ == dwType) || (REG_EXPAND_SZ == dwType)))
{
std::vector<TCHAR> aBuffer(dwSize);
lResult = ::RegQueryValueEx(hKey,pszValueName,nullptr,nullptr,reinterpret_cast<LPBYTE>(&*aBuffer.begin()),&dwSize);
diff --git a/plugins/Quotes/ModuleInfo.cpp b/plugins/Quotes/ModuleInfo.cpp
index f9a8513b41..69a835409e 100644
--- a/plugins/Quotes/ModuleInfo.cpp
+++ b/plugins/Quotes/ModuleInfo.cpp
@@ -80,10 +80,10 @@ CModuleInfo::TQuotesProvidersPtr CModuleInfo::GetQuoteProvidersPtr()
CModuleInfo::TXMLEnginePtr CModuleInfo::GetXMLEnginePtr()
{
- if(!g_pXMLEngine)
+ if (!g_pXMLEngine)
{
CGuard<CLightMutex> cs(g_lmParsers);
- if(!g_pXMLEngine)
+ if (!g_pXMLEngine)
{
mir_getXI(&xi);
g_pXMLEngine = TXMLEnginePtr(new CXMLEngineMI);
@@ -100,10 +100,10 @@ CModuleInfo::TXMLEnginePtr CModuleInfo::GetXMLEnginePtr()
CModuleInfo::THTMLEnginePtr CModuleInfo::GetHTMLEngine()
{
- if(!g_pHTMLEngine)
+ if (!g_pHTMLEngine)
{
CGuard<CLightMutex> cs(g_lmParsers);
- if(!g_pHTMLEngine)
+ if (!g_pHTMLEngine)
{
g_pHTMLEngine = THTMLEnginePtr(new CHTMLEngineMS);
}
@@ -127,13 +127,13 @@ bool CModuleInfo::Verify()
return false;
}
- if(!GetXMLEnginePtr())
+ if (!GetXMLEnginePtr())
{
Quotes_MessageBox(NULL,TranslateT("Miranda could not load Quotes plugin. XML parser is missing."),MB_OK|MB_ICONERROR);
return false;
}
- if(!g_pHTMLEngine && (false == CHTMLParserMS::IsInstalled()))
+ if (!g_pHTMLEngine && (false == CHTMLParserMS::IsInstalled()))
{
Quotes_MessageBox(NULL,
TranslateT("Miranda could not load Quotes plugin. Microsoft HTML parser is missing."),
diff --git a/plugins/Quotes/QuoteChart.cpp b/plugins/Quotes/QuoteChart.cpp
index 68fdbf57cb..3746540d23 100644
--- a/plugins/Quotes/QuoteChart.cpp
+++ b/plugins/Quotes/QuoteChart.cpp
@@ -66,7 +66,7 @@ namespace
tstring sName;
std::getline(line,sName,_T('\t'));
line >> oDateTime >> dRate;
- if((false == line.fail()) && (true == line.eof()))
+ if ((false == line.fail()) && (true == line.eof()))
{
rChart.AddValue(oDateTime,dRate);
}
diff --git a/plugins/Quotes/QuoteInfoDlg.cpp b/plugins/Quotes/QuoteInfoDlg.cpp
index 0df1e682b6..88253ec45d 100644
--- a/plugins/Quotes/QuoteInfoDlg.cpp
+++ b/plugins/Quotes/QuoteInfoDlg.cpp
@@ -198,7 +198,7 @@ INT_PTR QuotesMenu_OpenLogFile(WPARAM wp,LPARAM lp)
}
tstring sLogFileName;
- if((true == get_log_file(hContact,sLogFileName)) && (false == sLogFileName.empty()))
+ if ((true == get_log_file(hContact,sLogFileName)) && (false == sLogFileName.empty()))
{
::ShellExecute(NULL,_T("open"),sLogFileName.c_str(),NULL,NULL,SW_SHOWNORMAL);
}
@@ -215,7 +215,7 @@ INT_PTR QuotesMenu_RefreshContact(WPARAM wp,LPARAM lp)
}
CQuotesProviders::TQuotesProviderPtr pProvider = CModuleInfo::GetQuoteProvidersPtr()->GetContactProviderPtr(hContact);
- if(!pProvider)
+ if (!pProvider)
{
return 0;
}
diff --git a/plugins/Quotes/QuotesProviderFinance.cpp b/plugins/Quotes/QuotesProviderFinance.cpp
index 442869deeb..99d6127b32 100644
--- a/plugins/Quotes/QuotesProviderFinance.cpp
+++ b/plugins/Quotes/QuotesProviderFinance.cpp
@@ -42,7 +42,7 @@ bool CQuotesProviderFinance::WatchForQuote(const CQuote& rQuote,bool bWatch)
TContracts::iterator i = std::find_if(m_aContacts.begin(),m_aContacts.end(),
boost::bind(is_quote_id_equal,_1,sQuoteID));
- if((false == bWatch) && (i != m_aContacts.end()))
+ if ((false == bWatch) && (i != m_aContacts.end()))
{
HANDLE hContact = *i;
{// for CCritSection
@@ -53,7 +53,7 @@ bool CQuotesProviderFinance::WatchForQuote(const CQuote& rQuote,bool bWatch)
CallService(MS_DB_CONTACT_DELETE,reinterpret_cast<WPARAM>(hContact),0);
return true;
}
- else if((true == bWatch) && (i == m_aContacts.end()))
+ else if ((true == bWatch) && (i == m_aContacts.end()))
{
HANDLE hContact = CreateNewContact(rQuote.GetSymbol());
if(hContact)
@@ -136,7 +136,7 @@ namespace
for(int i = 0;i < cItems;++i)
{
const CQuotesProviderBase::CQuote* pQuote = get_quote_ptr_from_lb_index(hwndList,i);
- if((nullptr != pQuote)
+ if ((nullptr != pQuote)
&& ((0 == quotes_stricmp(rsQuoteID.c_str(),pQuote->GetID().c_str()))
|| (0 == quotes_stricmp(rsQuoteID.c_str(),pQuote->GetName().c_str()))
|| (0 == quotes_stricmp(rsQuoteID.c_str(),pQuote->GetSymbol().c_str()))))
diff --git a/plugins/Quotes/QuotesProviderGoogle.cpp b/plugins/Quotes/QuotesProviderGoogle.cpp
index 7711c2d9ba..6458180324 100644
--- a/plugins/Quotes/QuotesProviderGoogle.cpp
+++ b/plugins/Quotes/QuotesProviderGoogle.cpp
@@ -45,7 +45,7 @@ bool CQuotesProviderGoogle::WatchForRate(const CRateInfo& ri,
{
TContracts::const_iterator i = std::find_if(m_aContacts.begin(),m_aContacts.end(),
boost::bind(is_rate_watched,_1,ri.m_from,ri.m_to));
- if((true == bWatch) && (i == m_aContacts.end()))
+ if ((true == bWatch) && (i == m_aContacts.end()))
{
tstring sName = make_contact_name(ri.m_from.GetSymbol(),ri.m_to.GetSymbol());
HANDLE hContact = CreateNewContact(sName);
@@ -65,7 +65,7 @@ bool CQuotesProviderGoogle::WatchForRate(const CRateInfo& ri,
return true;
}
}
- else if((false == bWatch) && (i != m_aContacts.end()))
+ else if ((false == bWatch) && (i != m_aContacts.end()))
{
HANDLE hContact = *i;
{// for CCritSection
@@ -125,7 +125,7 @@ namespace
bool parse_html_node(const THTMLNodePtr& pNode,double& rdRate)
{
tstring sID = pNode->GetAttribute(_T("id"));
- if((false == sID.empty()) && (0 == quotes_stricmp(sID.c_str(),_T("currency_converter_result"))))
+ if ((false == sID.empty()) && (0 == quotes_stricmp(sID.c_str(),_T("currency_converter_result"))))
{
size_t cChild = pNode->GetChildCount();
// assert(1 == cChild);
@@ -189,15 +189,15 @@ void CQuotesProviderGoogle::RefreshQuotes(TContracts& anContacts)
tstring sFullURL = build_url(hContact,sURL);
// LogIt(Info,sFullURL);
- if((true == http.OpenURL(sFullURL)) && (true == IsOnline()))
+ if ((true == http.OpenURL(sFullURL)) && (true == IsOnline()))
{
tstring sHTML;
- if((true == http.ReadResponce(sHTML)) && (true == IsOnline()))
+ if ((true == http.ReadResponce(sHTML)) && (true == IsOnline()))
{
// LogIt(Info,sHTML);
double dRate = 0.0;
- if((true == parse_responce(sHTML,dRate)) && (true == IsOnline()))
+ if ((true == parse_responce(sHTML,dRate)) && (true == IsOnline()))
{
WriteContactRate(hContact,dRate);
continue;
@@ -253,7 +253,7 @@ namespace
tstring make_rate_name(const CQuotesProviderGoogle::CQuote& rFrom,
const CQuotesProviderGoogle::CQuote& rTo)
{
- if((false == rFrom.GetName().empty()) && (false == rTo.GetName().empty()))
+ if ((false == rFrom.GetName().empty()) && (false == rTo.GetName().empty()))
{
return make_contact_name(rFrom.GetName(),rTo.GetName());
}
@@ -395,11 +395,11 @@ namespace
{
size_t nFrom = static_cast<size_t>(::SendMessage(::GetDlgItem(hdlg,IDC_COMBO_CONVERT_FROM),CB_GETCURSEL,0,0));
size_t nTo = static_cast<size_t>(::SendMessage(::GetDlgItem(hdlg,IDC_COMBO_CONVERT_INTO),CB_GETCURSEL,0,0));
- if((CB_ERR != nFrom) && (CB_ERR != nTo) && (nFrom != nTo))
+ if ((CB_ERR != nFrom) && (CB_ERR != nTo) && (nFrom != nTo))
{
const CQuotesProviderGoogle::CQuoteSection& rSection = get_quotes();
size_t cQuotes = rSection.GetQuoteCount();
- if((nFrom < cQuotes) && (nTo < cQuotes))
+ if ((nFrom < cQuotes) && (nTo < cQuotes))
{
CQuotesProviderGoogle::CRateInfo ri;
ri.m_from = rSection.GetQuote(nFrom);
@@ -421,7 +421,7 @@ namespace
int nSel = ::SendMessage(hWnd,LB_GETCURSEL,0,0);
if(LB_ERR != nSel)
{
- if((LB_ERR != ::SendMessage(hWnd, LB_DELETESTRING,nSel,0))
+ if ((LB_ERR != ::SendMessage(hWnd, LB_DELETESTRING,nSel,0))
&& (nSel < static_cast<int>(g_aWatchedRates.size())))
{
@@ -485,15 +485,15 @@ double CQuotesProviderGoogle::Convert(double dAmount,const CQuote& from,const CQ
// LogIt(Info,sFullURL);
CHTTPSession http;
- if((true == http.OpenURL(sFullURL)))
+ if ((true == http.OpenURL(sFullURL)))
{
tstring sHTML;
- if((true == http.ReadResponce(sHTML)))
+ if ((true == http.ReadResponce(sHTML)))
{
// LogIt(Info,sHTML);
double dResult = 0.0;
- if((true == parse_responce(sHTML,dResult)))
+ if ((true == parse_responce(sHTML,dResult)))
{
return dResult;
}
diff --git a/plugins/Quotes/QuotesProviderGoogleFinance.cpp b/plugins/Quotes/QuotesProviderGoogleFinance.cpp
index 25b49f4120..8a129b6b8b 100644
--- a/plugins/Quotes/QuotesProviderGoogleFinance.cpp
+++ b/plugins/Quotes/QuotesProviderGoogleFinance.cpp
@@ -152,7 +152,7 @@ namespace
input.imbue(std::locale("English_United States.1252"));
input >> rdValue;
- if((true == input.bad()) || (true == input.fail()))
+ if ((true == input.bad()) || (true == input.fail()))
{
tistringstream inputSys(rsText);
input.imbue(GetSystemLocale());
@@ -240,7 +240,7 @@ namespace
assert(pValue);
- if((pValue) && (true == get_double_value(sDiff,*pValue)))
+ if ((pValue) && (true == get_double_value(sDiff,*pValue)))
{
rInfo.m_nFlags |= nItem;
return true;
@@ -315,10 +315,10 @@ void CQuotesProviderGoogleFinance::RefreshQuotes(TContracts& anContacts)
tstring sFullURL = build_url(hContact,sURL);
// LogIt(Info,sFullURL);
- if((true == http.OpenURL(sFullURL)) && (true == IsOnline()))
+ if ((true == http.OpenURL(sFullURL)) && (true == IsOnline()))
{
tstring sHTML;
- if((true == http.ReadResponce(sHTML)) && (true == IsOnline()))
+ if ((true == http.ReadResponce(sHTML)) && (true == IsOnline()))
{
// LogIt(Info,sHTML);
diff --git a/plugins/Quotes/QuotesProviderVisitor.h b/plugins/Quotes/QuotesProviderVisitor.h
index 600b7ae64c..9ae601f2a1 100644
--- a/plugins/Quotes/QuotesProviderVisitor.h
+++ b/plugins/Quotes/QuotesProviderVisitor.h
@@ -11,8 +11,8 @@ class CQuotesProviderYahoo;
class CQuotesProviderVisitor
{
public:
- CQuotesProviderVisitor(){}
- virtual ~CQuotesProviderVisitor(){}
+ CQuotesProviderVisitor() {}
+ virtual ~CQuotesProviderVisitor() {}
virtual void Visit(const CQuotesProviderBase& rProvider){}
virtual void Visit(const CQuotesProviderFinance& rProvider){}
diff --git a/plugins/Quotes/QuotesProviderYahoo.cpp b/plugins/Quotes/QuotesProviderYahoo.cpp
index e6315953de..35edb3207c 100644
--- a/plugins/Quotes/QuotesProviderYahoo.cpp
+++ b/plugins/Quotes/QuotesProviderYahoo.cpp
@@ -10,11 +10,11 @@ namespace
{
void remove_quotes(tstring& s)
{
- if(*s.begin() == _T('"'))
+ if (*s.begin() == _T('"'))
{
s.erase(s.begin());
}
- if(*s.rbegin() == _T('"'))
+ if (*s.rbegin() == _T('"'))
{
tstring::iterator i(s.begin());
std::advance(i,s.size()-1);
@@ -24,13 +24,13 @@ namespace
void remove_end_of_line(tstring& s)
{
- if(*s.rbegin() == _T('\n'))
+ if (*s.rbegin() == _T('\n'))
{
tstring::iterator i(s.begin());
std::advance(i,s.size()-1);
s.erase(i);
}
- if(*s.rbegin() == _T('\r'))
+ if (*s.rbegin() == _T('\r'))
{
tstring::iterator i(s.begin());
std::advance(i,s.size()-1);
@@ -102,10 +102,10 @@ void CQuotesProviderYahoo::RefreshQuotes(TContracts& anContacts)
{
oURL << _T("&f=snl1ohgpc1");
CHTTPSession http;
- if((true == http.OpenURL(oURL.str())) && (true == IsOnline()))
+ if ((true == http.OpenURL(oURL.str())) && (true == IsOnline()))
{
tstring sFile;
- if((true == http.ReadResponce(sFile)) && (true == IsOnline()))
+ if ((true == http.ReadResponce(sFile)) && (true == IsOnline()))
{
tistringstream out_str(sFile.c_str());
while(false == out_str.eof())
diff --git a/plugins/Quotes/QuotesProviders.cpp b/plugins/Quotes/QuotesProviders.cpp
index d5a65c470c..5fac2af14f 100644
--- a/plugins/Quotes/QuotesProviders.cpp
+++ b/plugins/Quotes/QuotesProviders.cpp
@@ -55,7 +55,7 @@ namespace
void convert_contact_settings(HANDLE hContact)
{
WORD dwLogMode = DBGetContactSettingWord(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_LOG,static_cast<WORD>(lmDisabled));
- if((dwLogMode&lmInternalHistory) || (dwLogMode&lmExternalFile))
+ if ((dwLogMode&lmInternalHistory) || (dwLogMode&lmExternalFile))
{
DBWriteContactSettingByte(hContact,QUOTES_PROTOCOL_NAME,DB_STR_CONTACT_SPEC_SETTINGS,1);
}
diff --git a/plugins/Quotes/SettingsDlg.cpp b/plugins/Quotes/SettingsDlg.cpp
index 6b5d73f5f4..e5795b51d1 100644
--- a/plugins/Quotes/SettingsDlg.cpp
+++ b/plugins/Quotes/SettingsDlg.cpp
@@ -399,7 +399,7 @@ namespace
if(BN_CLICKED == HIWORD(wp))
{
CSettingWindowParam* pParam = get_param(hWnd);
- if(!pParam->m_pPopupSettings)
+ if (!pParam->m_pPopupSettings)
{
CQuotesProviders::TQuotesProviderPtr pProvider = CModuleInfo::GetQuoteProvidersPtr()->GetContactProviderPtr(pParam->m_hContact);
@@ -447,7 +447,7 @@ namespace
tstring sLogFile = get_window_text(hwndLogFile);
tstring sLogFileFormat = get_window_text(hwndLogFileFrmt);
tstring sHistoryFormat = get_window_text(hwndHistoryFrmt);
- if((nLogMode&lmExternalFile))
+ if ((nLogMode&lmExternalFile))
{
if(true == sLogFile.empty())
{
@@ -463,7 +463,7 @@ namespace
}
}
- if((true == bOk) && (nLogMode&lmInternalHistory) && (true == sHistoryFormat.empty()))
+ if ((true == bOk) && (nLogMode&lmInternalHistory) && (true == sHistoryFormat.empty()))
{
prepare_edit_ctrl_for_error(hwndHistoryFrmt);
Quotes_MessageBox(hWnd,TranslateT("Enter history format."),MB_OK|MB_ICONERROR);
@@ -472,7 +472,7 @@ namespace
HWND hwndPopupFrmt = ::GetDlgItem(hWnd,IDC_EDIT_POPUP_FORMAT);
tstring sPopupFormat = get_window_text(hwndPopupFrmt);
- if((true == bOk) && (nLogMode&lmPopup) && (true == sPopupFormat.empty()))
+ if ((true == bOk) && (nLogMode&lmPopup) && (true == sPopupFormat.empty()))
{
prepare_edit_ctrl_for_error(hwndPopupFrmt);
Quotes_MessageBox(hWnd,TranslateT("Enter popup window format."),MB_OK|MB_ICONERROR);
@@ -624,7 +624,7 @@ namespace
tstring sLogFile = get_window_text(hwndLogFile);
tstring sLogFileFormat = get_window_text(hwndLogFileFrmt);
- if((nLogMode&lmExternalFile))
+ if ((nLogMode&lmExternalFile))
{
if(true == sLogFile.empty())
{
@@ -642,7 +642,7 @@ namespace
HWND hwndHistoryFrmt = ::GetDlgItem(hWnd,IDC_EDIT_HISTORY_FORMAT);
tstring sHistoryFormat = get_window_text(hwndHistoryFrmt);
- if((true == bOk) && (nLogMode&lmInternalHistory) && (true == sHistoryFormat.empty()))
+ if ((true == bOk) && (nLogMode&lmInternalHistory) && (true == sHistoryFormat.empty()))
{
prepare_edit_ctrl_for_error(hwndHistoryFrmt);
Quotes_MessageBox(hWnd,TranslateT("Enter history format."),MB_OK|MB_ICONERROR);
@@ -651,7 +651,7 @@ namespace
HWND hwndPopupFrmt = ::GetDlgItem(hWnd,IDC_EDIT_POPUP_FORMAT);
tstring sPopupFormat = get_window_text(hwndPopupFrmt);
- if((true == bOk) && (nLogMode&lmPopup) && (true == sPopupFormat.empty()))
+ if ((true == bOk) && (nLogMode&lmPopup) && (true == sPopupFormat.empty()))
{
prepare_edit_ctrl_for_error(hwndPopupFrmt);
Quotes_MessageBox(hWnd,TranslateT("Enter popup window format."),MB_OK|MB_ICONERROR);
diff --git a/plugins/Quotes/XMLEngineMI.cpp b/plugins/Quotes/XMLEngineMI.cpp
index f17aa54aa3..7e2adfb7d9 100644
--- a/plugins/Quotes/XMLEngineMI.cpp
+++ b/plugins/Quotes/XMLEngineMI.cpp
@@ -154,7 +154,7 @@ IXMLNode::TXMLNodePtr CXMLEngineMI::LoadFile(const tstring& rsFileName)const
if(0 == ::_tfopen_s(&stream,rsFileName.c_str(),_T("r")))
{
struct _stat st;
- if(-1 != ::_fstat(::_fileno(stream),&st))
+ if (-1 != ::_fstat(::_fileno(stream),&st))
{
std::vector<char> aBuffer(st.st_size+1);
char* pBuffer = &*(aBuffer.begin());