summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory/src/BinaryExport.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/BasicHistory/src/BinaryExport.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/BasicHistory/src/BinaryExport.cpp')
-rw-r--r--plugins/BasicHistory/src/BinaryExport.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/BasicHistory/src/BinaryExport.cpp b/plugins/BasicHistory/src/BinaryExport.cpp
index 619a9de152..bc67e95756 100644
--- a/plugins/BasicHistory/src/BinaryExport.cpp
+++ b/plugins/BasicHistory/src/BinaryExport.cpp
@@ -52,9 +52,9 @@ BinaryExport::~BinaryExport()
void BinaryExport::WriteString(const std::wstring &str)
{
- int conv = WideCharToMultiByte(codepage, 0, str.c_str(), (int)str.length() + 1, NULL, 0, NULL, NULL);
+ int conv = WideCharToMultiByte(codepage, 0, str.c_str(), (int)str.length() + 1, nullptr, 0, nullptr, nullptr);
char* buf = new char[conv];
- conv = WideCharToMultiByte(codepage, 0, str.c_str(), (int)str.length() + 1, buf, conv, NULL, NULL);
+ conv = WideCharToMultiByte(codepage, 0, str.c_str(), (int)str.length() + 1, buf, conv, nullptr, nullptr);
EXP_FILE.write(buf, conv);
delete[] buf;
}
@@ -95,7 +95,7 @@ bool BinaryExport::ReadString(std::wstring &str)
if (totalSize == 0)
return true;
- int sizeW = MultiByteToWideChar(codepage, 0, (char*)buf.c_str(), totalSize, NULL, 0);
+ int sizeW = MultiByteToWideChar(codepage, 0, (char*)buf.c_str(), totalSize, nullptr, 0);
str.resize(sizeW);
MultiByteToWideChar(codepage, 0, (char*)buf.c_str(), totalSize, (wchar_t*)str.c_str(), sizeW);
return true;