diff options
| author | Neil <nyamatongwe@gmail.com> | 2018-05-17 11:04:08 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2018-05-17 11:04:08 +1000 | 
| commit | c5f7d797cda42ccf826b414e5d33b911e93ffe7b (patch) | |
| tree | 3c8e43779716458d75bdc92e20077a9f2eb5cd30 | |
| parent | 46024f0975c0f48cfff8986a5ff71aa4e3dbbee0 (diff) | |
| download | scintilla-mirror-c5f7d797cda42ccf826b414e5d33b911e93ffe7b.tar.gz | |
Use nullptr instead of 0 in headers as this diminishes the number of warnings.
| -rw-r--r-- | include/Platform.h | 4 | ||||
| -rw-r--r-- | lexlib/CharacterSet.h | 2 | ||||
| -rw-r--r-- | lexlib/StyleContext.h | 4 | 
3 files changed, 5 insertions, 5 deletions
| diff --git a/include/Platform.h b/include/Platform.h index ad927fdf2..0b730944f 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -314,7 +314,7 @@ class Window {  protected:  	WindowID wid;  public: -	Window() noexcept : wid(0), cursorLast(cursorInvalid) { +	Window() noexcept : wid(nullptr), cursorLast(cursorInvalid) {  	}  	Window(const Window &source) = delete;  	Window(Window &&) = delete; @@ -327,7 +327,7 @@ public:  	Window &operator=(Window &&) = delete;  	virtual ~Window();  	WindowID GetID() const noexcept { return wid; } -	bool Created() const noexcept { return wid != 0; } +	bool Created() const noexcept { return wid != nullptr; }  	void Destroy();  	PRectangle GetPosition() const;  	void SetPosition(PRectangle rc); diff --git a/lexlib/CharacterSet.h b/lexlib/CharacterSet.h index 5965f38ca..7c2a1fe48 100644 --- a/lexlib/CharacterSet.h +++ b/lexlib/CharacterSet.h @@ -59,7 +59,7 @@ public:  	}  	~CharacterSet() {  		delete []bset; -		bset = 0; +		bset = nullptr;  		size = 0;  	}  	CharacterSet &operator=(const CharacterSet &other) { diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index 1d40825f4..cc61dea3d 100644 --- a/lexlib/StyleContext.h +++ b/lexlib/StyleContext.h @@ -57,7 +57,7 @@ public:  	StyleContext(Sci_PositionU startPos, Sci_PositionU length,                          int initStyle, LexAccessor &styler_, char chMask='\377') :  		styler(styler_), -		multiByteAccess(0), +		multiByteAccess(nullptr),  		endPos(startPos + length),  		posRelative(0),  		currentPosLastRelative(0x7FFFFFFF), @@ -169,7 +169,7 @@ public:  			}  			Sci_Position diffRelative = n - offsetRelative;  			Sci_Position posNew = multiByteAccess->GetRelativePosition(posRelative, diffRelative); -			const int chReturn = multiByteAccess->GetCharacterAndWidth(posNew, 0); +			const int chReturn = multiByteAccess->GetCharacterAndWidth(posNew, nullptr);  			posRelative = posNew;  			currentPosLastRelative = currentPos;  			offsetRelative = n; | 
