diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/Variables/src/parse_regexp.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/Variables/src/parse_regexp.cpp')
-rw-r--r-- | plugins/Variables/src/parse_regexp.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Variables/src/parse_regexp.cpp b/plugins/Variables/src/parse_regexp.cpp index 7031fc4cc6..b401d15aae 100644 --- a/plugins/Variables/src/parse_regexp.cpp +++ b/plugins/Variables/src/parse_regexp.cpp @@ -30,13 +30,13 @@ static wchar_t *parseRegExpCheck(ARGUMENTSINFO *ai) int offsets[99];
if (ai->argc != 3)
- return NULL;
+ return nullptr;
ai->flags = AIF_FALSE;
- pcre16 *ppat = pcre16_compile(ai->targv[1], 0, &err, &erroffset, NULL);
- if (ppat == NULL)
- return NULL;
+ pcre16 *ppat = pcre16_compile(ai->targv[1], 0, &err, &erroffset, nullptr);
+ if (ppat == nullptr)
+ return nullptr;
pcre16_extra *extra = pcre16_study(ppat, 0, &err);
int nmat = pcre16_exec(ppat, extra, ai->targv[2], (int)mir_wstrlen(ai->targv[2]), 0, 0, offsets, 99);
@@ -60,16 +60,16 @@ static wchar_t *parseRegExpSubstr(ARGUMENTSINFO *ai) int offsets[99];
if (ai->argc != 4)
- return NULL;
+ return nullptr;
number = _wtoi(ai->targv[3]);
if (number < 0)
- return NULL;
+ return nullptr;
ai->flags = AIF_FALSE;
- pcre16 *ppat = pcre16_compile(ai->targv[1], 0, &err, &erroffset, NULL);
- if (ppat == NULL)
- return NULL;
+ pcre16 *ppat = pcre16_compile(ai->targv[1], 0, &err, &erroffset, nullptr);
+ if (ppat == nullptr)
+ return nullptr;
pcre16_extra *extra = pcre16_study(ppat, 0, &err);
int nmat = pcre16_exec(ppat, extra, ai->targv[2], (int)mir_wstrlen(ai->targv[2]), 0, 0, offsets, 99);
|