From 99de80e7224f2491fb7518e32f195ad6a912b624 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 28 Nov 2014 11:19:20 +0100 Subject: replaced all uses of NULL with nullptr fixed a few placed where NULL was used as a number or boolean --- src/nexusinterface.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/nexusinterface.cpp') diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index d68fe8fe..bd40921f 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -218,8 +218,8 @@ void NexusInterface::interpretNexusFileName(const QString &fileName, QString &mo QString r3Highlight(fileName); r3Highlight.insert(result.position(3) + result.length(3), "* ").insert(result.position(3), " *"); - selection.addChoice(candidate.c_str(), r3Highlight, strtol(candidate.c_str(), NULL, 10)); - selection.addChoice(candidate2.c_str() + offset, r2Highlight, abs(strtol(candidate2.c_str() + offset, NULL, 10))); + selection.addChoice(candidate.c_str(), r3Highlight, strtol(candidate.c_str(), nullptr, 10)); + selection.addChoice(candidate2.c_str() + offset, r2Highlight, abs(strtol(candidate2.c_str() + offset, nullptr, 10))); if (selection.exec() == QDialog::Accepted) { modID = selection.getChoiceData().toInt(); } else { @@ -229,7 +229,7 @@ void NexusInterface::interpretNexusFileName(const QString &fileName, QString &mo modID = -1; } } else { - modID = strtol(candidate.c_str(), NULL, 10); + modID = strtol(candidate.c_str(), nullptr, 10); } qDebug("mod id guessed: %s -> %d", qPrintable(fileName), modID); } else if (std::tr1::regex_search(fileNameUTF8.constData(), result, simpleexp)) { @@ -542,7 +542,7 @@ void NexusInterface::requestFinished() void NexusInterface::requestError(QNetworkReply::NetworkError) { QNetworkReply *reply = qobject_cast(sender()); - if (reply == NULL) { + if (reply == nullptr) { qWarning("invalid sender type"); return; } @@ -555,7 +555,7 @@ void NexusInterface::requestError(QNetworkReply::NetworkError) void NexusInterface::requestTimeout() { QTimer *timer = qobject_cast(sender()); - if (timer == NULL) { + if (timer == nullptr) { qWarning("invalid sender type"); return; } @@ -577,10 +577,10 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID , int nexusGameId) : m_ModID(modID) , m_FileID(0) - , m_Reply(NULL) + , m_Reply(nullptr) , m_Type(type) , m_UserData(userData) - , m_Timeout(NULL) + , m_Timeout(nullptr) , m_Reroute(false) , m_ID(s_NextID.fetchAndAddAcquire(1)) , m_URL(url) @@ -598,10 +598,10 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(std::vector modIDList : m_ModID(-1) , m_ModIDList(modIDList) , m_FileID(0) - , m_Reply(NULL) + , m_Reply(nullptr) , m_Type(type) , m_UserData(userData) - , m_Timeout(NULL) + , m_Timeout(nullptr) , m_Reroute(false) , m_ID(s_NextID.fetchAndAddAcquire(1)) , m_URL(url) @@ -619,10 +619,10 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID , int nexusGameId) : m_ModID(modID) , m_FileID(fileID) - , m_Reply(NULL) + , m_Reply(nullptr) , m_Type(type) , m_UserData(userData) - , m_Timeout(NULL) + , m_Timeout(nullptr) , m_Reroute(false) , m_ID(s_NextID.fetchAndAddAcquire(1)) , m_URL(url) -- cgit v1.3.1