Fix NULL usage
Ignore scintilla files in NULL check. Allow to use nullptr as an alias.
This commit is contained in:
parent
875e127108
commit
619071cb71
6 changed files with 15 additions and 12 deletions
6
.github/workflows/code_checks.yml
vendored
6
.github/workflows/code_checks.yml
vendored
|
|
@ -87,8 +87,10 @@ jobs:
|
|||
- name: Check for obsolete macros use
|
||||
run: |
|
||||
git fetch --depth=1 origin master
|
||||
if git diff origin/master ':!.github/workflows/code_checks.yml' |
|
||||
grep -E '^\+.*(wxOVERRIDE|wxNOEXCEPT|\WNULL)'; then
|
||||
if git diff origin/master \
|
||||
':!.github/workflows/code_checks.yml' \
|
||||
':!src/stc/scintilla/' \
|
||||
| grep -E '^\+.*(wxOVERRIDE|wxNOEXCEPT|\WNULL)'; then
|
||||
echo "::error ::Please use C++11 equivalents of the deprecated macros in the new code."
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ ALIASES += header{1}="Include file:^^ \verbatim #include <\1> \endverbatim"
|
|||
# some formatting aliases
|
||||
ALIASES += true="<span class='literal'>true</span>"
|
||||
ALIASES += false="<span class='literal'>false</span>"
|
||||
ALIASES += nullptr="<span class='literal'>nullptr</span>"
|
||||
ALIASES += NULL="<span class='literal'>nullptr</span>"
|
||||
ALIASES += NUL="<span class='literal'>NUL</span>"
|
||||
|
||||
|
|
|
|||
|
|
@ -8206,7 +8206,7 @@ public:
|
|||
The position of the point to check, in window device coordinates.
|
||||
@param pos
|
||||
Receives the position of the character at the given position. May
|
||||
be @NULL.
|
||||
be @nullptr.
|
||||
|
||||
@see PositionToXY(), XYToPosition()
|
||||
*/
|
||||
|
|
@ -8232,10 +8232,10 @@ public:
|
|||
The position of the point to check, in window device coordinates.
|
||||
@param col
|
||||
Receives the column of the character at the given position. May be
|
||||
@NULL.
|
||||
@nullptr.
|
||||
@param row
|
||||
Receives the row of the character at the given position. May be
|
||||
@NULL.
|
||||
@nullptr.
|
||||
|
||||
@see PositionToXY(), XYToPosition()
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
- (void)drawRect:(NSRect)dirtyRect
|
||||
{
|
||||
static_cast<wxWidgetCocoaImpl*>(m_wxWin->GetPeer())->
|
||||
drawRect(&dirtyRect, self, NULL);
|
||||
drawRect(&dirtyRect, self, nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -1397,18 +1397,18 @@ public:
|
|||
}
|
||||
|
||||
unsigned int GetImeCaretPos() const noexcept {
|
||||
return ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, wxNullPtr, 0);
|
||||
return ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, nullptr, 0);
|
||||
}
|
||||
|
||||
std::vector<BYTE> GetImeAttributes() {
|
||||
const int attrLen = ::ImmGetCompositionStringW(hIMC, GCS_COMPATTR, wxNullPtr, 0);
|
||||
const int attrLen = ::ImmGetCompositionStringW(hIMC, GCS_COMPATTR, nullptr, 0);
|
||||
std::vector<BYTE> attr(attrLen, 0);
|
||||
::ImmGetCompositionStringW(hIMC, GCS_COMPATTR, &attr[0], static_cast<DWORD>(attr.size()));
|
||||
return attr;
|
||||
}
|
||||
|
||||
std::wstring GetCompositionString(DWORD dwIndex) {
|
||||
const LONG byteLen = ::ImmGetCompositionStringW(hIMC, dwIndex, wxNullPtr, 0);
|
||||
const LONG byteLen = ::ImmGetCompositionStringW(hIMC, dwIndex, nullptr, 0);
|
||||
std::wstring wcs(byteLen / 2, 0);
|
||||
::ImmGetCompositionStringW(hIMC, dwIndex, &wcs[0], byteLen);
|
||||
return wcs;
|
||||
|
|
|
|||
|
|
@ -718,7 +718,7 @@ public:
|
|||
The position of the point to check, in window device coordinates.
|
||||
@param pos
|
||||
Receives the position of the character at the given position. May
|
||||
be @NULL.
|
||||
be @nullptr.
|
||||
|
||||
@see PositionToXY(), XYToPosition()
|
||||
*/
|
||||
|
|
@ -744,10 +744,10 @@ public:
|
|||
The position of the point to check, in window device coordinates.
|
||||
@param col
|
||||
Receives the column of the character at the given position. May be
|
||||
@NULL.
|
||||
@nullptr.
|
||||
@param row
|
||||
Receives the row of the character at the given position. May be
|
||||
@NULL.
|
||||
@nullptr.
|
||||
|
||||
@see PositionToXY(), XYToPosition()
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue