1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #pragma once
- #include <memory>
- namespace WwiseGTE
- {
-
- template <typename T>
- struct SharedPtrEQ
- {
- bool operator()(std::shared_ptr<T> const& sp0, std::shared_ptr<T> const& sp1) const
- {
- return (sp0 ? (sp1 ? *sp0 == *sp1 : false) : !sp1);
- }
- };
-
- template <typename T>
- struct SharedPtrNEQ
- {
- bool operator()(std::shared_ptr<T> const& sp0, std::shared_ptr<T> const& sp1) const
- {
- return !SharedPtrEQ<T>()(sp0, sp1);
- }
- };
-
- template <typename T>
- struct SharedPtrLT
- {
- bool operator()(std::shared_ptr<T> const& sp0, std::shared_ptr<T> const& sp1) const
- {
- return (sp1 ? (!sp0 || *sp0 < *sp1) : false);
- }
- };
-
- template <typename T>
- struct SharedPtrLTE
- {
- bool operator()(std::shared_ptr<T> const& sp0, std::shared_ptr<T> const& sp1) const
- {
- return !SharedPtrLT<T>()(sp1, sp0);
- }
- };
-
- template <typename T>
- struct SharedPtrGT
- {
- bool operator()(std::shared_ptr<T> const& sp0, std::shared_ptr<T> const& sp1) const
- {
- return SharedPtrLT<T>()(sp1, sp0);
- }
- };
-
- template <typename T>
- struct SharedPtrGTE
- {
- bool operator()(std::shared_ptr<T> const& sp0, std::shared_ptr<T> const& sp1) const
- {
- return !SharedPtrLT<T>()(sp0, sp1);
- }
- };
- }
|