summaryrefslogtreecommitdiff
path: root/plugins/PasteIt/src/PasteToWeb2.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/PasteIt/src/PasteToWeb2.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/PasteIt/src/PasteToWeb2.cpp')
-rw-r--r--plugins/PasteIt/src/PasteToWeb2.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/plugins/PasteIt/src/PasteToWeb2.cpp b/plugins/PasteIt/src/PasteToWeb2.cpp
index a5843149a3..17b3ca116f 100644
--- a/plugins/PasteIt/src/PasteToWeb2.cpp
+++ b/plugins/PasteIt/src/PasteToWeb2.cpp
@@ -103,27 +103,27 @@ void PasteToWeb2::SendToServer(std::wstring str, std::wstring fileName, std::wst
wchar_t* resCont = SendToWeb("http://wklej.to/api/", headers, content);
error = TranslateT("Error during sending text to web page");
- if (resCont != NULL)
+ if (resCont != nullptr)
{
- HXML hXml = xmlParseString(resCont, NULL, L"methodResponse");
- if (hXml != NULL)
+ HXML hXml = xmlParseString(resCont, nullptr, L"methodResponse");
+ if (hXml != nullptr)
{
HXML node = xmlGetChildByPath(hXml, L"params/param/value/array/data/value/int", 0);
- if (node != NULL && !mir_wstrcmp(xmlGetText(node), L"1"))
+ if (node != nullptr && !mir_wstrcmp(xmlGetText(node), L"1"))
{
node = xmlGetChildByPath(hXml, L"params/param/value/array/data", 0);
- if (node != NULL)
+ if (node != nullptr)
{
node = xmlGetNthChild(node, L"value", 1);
- if (node != NULL)
+ if (node != nullptr)
{
node = xmlGetChildByPath(node, L"string", 0);
- if (node != NULL)
+ if (node != nullptr)
{
char* s = mir_u2a_cp(xmlGetText(node), CP_ACP);
mir_strncpy(szFileLink, s, _countof(szFileLink));
mir_free(s);
- error = NULL;
+ error = nullptr;
}
}
}
@@ -143,22 +143,22 @@ std::list<PasteFormat> PasteToWeb2::GetFormats()
std::wstring content = L"<?xml version=\"1.0\"?>\r\n<methodCall><methodName>types</methodName></methodCall>";
wchar_t* resCont = SendToWeb("http://wklej.to/api/", headers, content);
- if (resCont != NULL)
+ if (resCont != nullptr)
{
- HXML hXml = xmlParseString(resCont, NULL, L"methodResponse");
- if (hXml != NULL)
+ HXML hXml = xmlParseString(resCont, nullptr, L"methodResponse");
+ if (hXml != nullptr)
{
HXML node = xmlGetChildByPath(hXml, L"params/param/value/array/data/value/int", 0);
- if (node != NULL && !mir_wstrcmp(xmlGetText(node), L"1"))
+ if (node != nullptr && !mir_wstrcmp(xmlGetText(node), L"1"))
{
node = xmlGetChildByPath(hXml, L"params/param/value/array/data", 0);
- if (node != NULL)
+ if (node != nullptr)
{
node = xmlGetNthChild(node, L"value", 1);
- if (node != NULL)
+ if (node != nullptr)
{
node = xmlGetChildByPath(node, L"string", 0);
- if (node != NULL)
+ if (node != nullptr)
{
std::wstring str = xmlGetText(node);
std::wstring::size_type pos = str.find(L'\n');