aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CaseConvert.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-10-11 16:38:05 +1100
committerNeil <nyamatongwe@gmail.com>2018-10-11 16:38:05 +1100
commite462c018b9dda9e111a07d298bae8fcebb14c8b2 (patch)
tree03fec25e9b83d576f73d91facdd092e4eeece597 /src/CaseConvert.cxx
parent083b30ff1783f7b6c803d2c5489ddcd5d0dce14f (diff)
downloadscintilla-mirror-e462c018b9dda9e111a07d298bae8fcebb14c8b2.tar.gz
Backport: Replace NULL and 0 with nullptr in clear cases of pure C++ code.
Backport of changeset 7111:e3cecaf6bd37.
Diffstat (limited to 'src/CaseConvert.cxx')
-rw-r--r--src/CaseConvert.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CaseConvert.cxx b/src/CaseConvert.cxx
index 2d6db4eb7..a3680c084 100644
--- a/src/CaseConvert.cxx
+++ b/src/CaseConvert.cxx
@@ -597,11 +597,11 @@ public:
const char *Find(int character) {
const std::vector<int>::iterator it = std::lower_bound(characters.begin(), characters.end(), character);
if (it == characters.end())
- return 0;
+ return nullptr;
else if (*it == character)
return conversions[it - characters.begin()].conversion;
else
- return 0;
+ return nullptr;
}
size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed) override {
size_t lenConverted = 0;
@@ -609,7 +609,7 @@ public:
unsigned char bytes[UTF8MaxBytes + 1]{};
while (mixedPos < lenMixed) {
const unsigned char leadByte = mixed[mixedPos];
- const char *caseConverted = 0;
+ const char *caseConverted = nullptr;
size_t lenMixedChar = 1;
if (UTF8IsAscii(leadByte)) {
caseConverted = Find(leadByte);
@@ -774,7 +774,7 @@ CaseConverter *ConverterForConversion(enum CaseConversion conversion) {
case CaseConversionLower:
return &caseConvLow;
}
- return 0;
+ return nullptr;
}
}