[Scummvm-git-logs] scummvm master -> 19c3f539a7301625da63bdbe7f60e885ad1db769
dreammaster
noreply at scummvm.org
Fri Jun 3 01:39:57 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
19c3f539a7 COMMON: Add comparison to nullptr to SharedPtr
Commit: 19c3f539a7301625da63bdbe7f60e885ad1db769
https://github.com/scummvm/scummvm/commit/19c3f539a7301625da63bdbe7f60e885ad1db769
Author: elasota (ejlasota at gmail.com)
Date: 2022-06-02T18:39:54-07:00
Commit Message:
COMMON: Add comparison to nullptr to SharedPtr
Changed paths:
common/ptr.h
diff --git a/common/ptr.h b/common/ptr.h
index 20b2dc234c5..5bedb8e09a4 100644
--- a/common/ptr.h
+++ b/common/ptr.h
@@ -238,6 +238,14 @@ public:
return _pointer != r.get();
}
+ bool operator==(std::nullptr_t) const {
+ return _pointer == nullptr;
+ }
+
+ bool operator!=(std::nullptr_t) const {
+ return _pointer != nullptr;
+ }
+
/**
* Implicit conversion operator to bool for convenience, to make
* checks like "if (sharedPtr) ..." possible.
More information about the Scummvm-git-logs
mailing list