diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-04-02 16:13:23 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-06-24 13:42:54 +0200 |
commit | 139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901 (patch) | |
tree | 8d06ede9e14516516a44c5ed710058003088eec2 /common/rdr/InStream.h | |
parent | 45198e5235f4b724277665b242cf855a0ff4518b (diff) | |
download | tigervnc-139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901.tar.gz tigervnc-139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901.zip |
Use nullptr in all C++ code
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
Diffstat (limited to 'common/rdr/InStream.h')
-rw-r--r-- | common/rdr/InStream.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/rdr/InStream.h b/common/rdr/InStream.h index 019ca5a7..939439e1 100644 --- a/common/rdr/InStream.h +++ b/common/rdr/InStream.h @@ -64,7 +64,7 @@ namespace rdr { #endif if (length > (size_t)(end - ptr)) { - if (restorePoint != NULL) { + if (restorePoint != nullptr) { bool ret; size_t restoreDiff; @@ -100,21 +100,21 @@ namespace rdr { inline void setRestorePoint() { #ifdef RFB_INSTREAM_CHECK - if (restorePoint != NULL) + if (restorePoint != nullptr) throw Exception("Nested use of input stream restore point"); #endif restorePoint = ptr; } inline void clearRestorePoint() { #ifdef RFB_INSTREAM_CHECK - if (restorePoint == NULL) + if (restorePoint == nullptr) throw Exception("Incorrect clearing of input stream restore point"); #endif - restorePoint = NULL; + restorePoint = nullptr; } inline void gotoRestorePoint() { #ifdef RFB_INSTREAM_CHECK - if (restorePoint == NULL) + if (restorePoint == nullptr) throw Exception("Incorrect activation of input stream restore point"); #endif ptr = restorePoint; @@ -204,7 +204,7 @@ namespace rdr { protected: - InStream() : restorePoint(NULL) + InStream() : restorePoint(nullptr) #ifdef RFB_INSTREAM_CHECK ,checkedBytes(0) #endif |