From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- plugins/BasicHistory/src/ExportManager.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/BasicHistory/src/ExportManager.cpp') diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 820abcf64b..111a813ed7 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -90,7 +90,7 @@ std::wstring ReplaceExt(const std::wstring& file, const wchar_t* ext) bool ExportManager::Export(IExport::ExportType type) { - m_exp = NULL; + m_exp = nullptr; UINT cp; std::wstring encoding; bool isBin = false; @@ -180,7 +180,7 @@ bool ExportManager::Export(IExport::ExportType type) const wchar_t* ExportManager::GetExt(IImport::ImportType type) { - IImport *imp = NULL; + IImport *imp = nullptr; switch (type) { case IImport::Binary: imp = new BinaryExport(); @@ -199,7 +199,7 @@ const wchar_t* ExportManager::GetExt(IImport::ImportType type) int ExportManager::Import(IImport::ImportType type, const std::vector& contacts) { - IImport *imp = NULL; + IImport *imp = nullptr; switch (type) { case IImport::Binary: imp = new BinaryExport(); @@ -238,7 +238,7 @@ int ExportManager::Import(IImport::ImportType type, const std::vector& bool ExportManager::Import(IImport::ImportType type, std::vector& eventList, std::wstring* err, bool* differentContact, std::vector* contacts) { - IImport *imp = NULL; + IImport *imp = nullptr; switch (type) { case IImport::Binary: imp = new BinaryExport(); @@ -269,10 +269,10 @@ bool ExportManager::Import(IImport::ImportType type, std::vectorIsContactInFile(v); if (contInFile == -1) { ret = false; - if (err != NULL) + if (err != nullptr) *err = TranslateT("File does not contain selected contact"); - if (contacts != NULL && differentContact != NULL) { + if (contacts != nullptr && differentContact != nullptr) { contInFile = imp->IsContactInFile(*contacts); if (contInFile >= 0) { *differentContact = true; @@ -282,12 +282,12 @@ bool ExportManager::Import(IImport::ImportType type, std::vectorGetEventList(eventList); - if (!ret && err != NULL) + if (!ret && err != nullptr) *err = TranslateT("File is corrupted"); } else { ret = false; - if (err != NULL) + if (err != nullptr) *err = TranslateT("File is corrupted"); } stream->close(); @@ -298,7 +298,7 @@ bool ExportManager::Import(IImport::ImportType type, std::vectorWriteGroup(isMe, time, user, eventText); @@ -371,7 +371,7 @@ void ExportManager::DeleteExportedEvents() void ExportManager::SetDeleteWithoutExportEvents(int deltaTime, DWORD now) { - m_exp = NULL; + m_exp = nullptr; m_deltaTime = deltaTime; m_now = now; RefreshEventList(); -- cgit v1.2.3