diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-02-26 04:41:16 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-02-26 04:41:16 +0000 |
| commit | c07ee39e4241251ef4583ecbc22a369935ad8b9a (patch) | |
| tree | b42a18849d47372143b6893d5e78e1c8047c49a0 /Common/interface | |
| parent | Basic math: added convience constructor Vector4(Vector3, float) (diff) | |
| download | DiligentCore-c07ee39e4241251ef4583ecbc22a369935ad8b9a.tar.gz DiligentCore-c07ee39e4241251ef4583ecbc22a369935ad8b9a.zip | |
Cosmetic changes
Diffstat (limited to 'Common/interface')
| -rw-r--r-- | Common/interface/DataBlobImpl.h | 8 | ||||
| -rw-r--r-- | Common/interface/ObjectBase.h | 14 | ||||
| -rw-r--r-- | Common/interface/RefCountedObjectImpl.h | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/Common/interface/DataBlobImpl.h b/Common/interface/DataBlobImpl.h index 5394891c..a151957d 100644 --- a/Common/interface/DataBlobImpl.h +++ b/Common/interface/DataBlobImpl.h @@ -38,11 +38,11 @@ namespace Diligent class DataBlobImpl : public Diligent::ObjectBase<IDataBlob> { public: - typedef Diligent::ObjectBase<IDataBlob> TBase; + typedef ObjectBase<IDataBlob> TBase; - DataBlobImpl( IReferenceCounters *pRefCounters, size_t InitialSize = 0 ); + DataBlobImpl(IReferenceCounters* pRefCounters, size_t InitialSize = 0); - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override; + virtual void QueryInterface(const INTERFACE_ID &IID, IObject** ppInterface )override; /// Sets the size of the internal data buffer virtual void Resize( size_t NewSize )override; @@ -54,7 +54,7 @@ public: virtual void* GetDataPtr()override; private: - std::vector<Diligent::Uint8> m_DataBuff; + std::vector<Uint8> m_DataBuff; }; } diff --git a/Common/interface/ObjectBase.h b/Common/interface/ObjectBase.h index 07455ba6..b7f0edb6 100644 --- a/Common/interface/ObjectBase.h +++ b/Common/interface/ObjectBase.h @@ -49,11 +49,11 @@ namespace Diligent } #define IMPLEMENT_QUERY_INTERFACE(ClassName, InterfaceID, ParentClassName) \ - void ClassName :: QueryInterface(const Diligent::INTERFACE_ID &IID, IObject **ppInterface) \ + void ClassName :: QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) \ IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName) #define IMPLEMENT_QUERY_INTERFACE_IN_PLACE(InterfaceID, ParentClassName) \ - virtual void QueryInterface(const Diligent::INTERFACE_ID &IID, IObject **ppInterface)override \ + virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface)override \ IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName) @@ -62,17 +62,17 @@ template<typename BaseInterface> class ObjectBase : public RefCountedObject<BaseInterface> { public: - ObjectBase(IReferenceCounters *pRefCounters) : - RefCountedObject<BaseInterface>( pRefCounters ) + ObjectBase(IReferenceCounters* pRefCounters) : + RefCountedObject<BaseInterface>(pRefCounters) {} - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface ) + virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) { - if( ppInterface == nullptr ) + if (ppInterface == nullptr) return; *ppInterface = nullptr; - if( IID == Diligent::IID_Unknown ) + if (IID == IID_Unknown) { *ppInterface = this; (*ppInterface)->AddRef(); diff --git a/Common/interface/RefCountedObjectImpl.h b/Common/interface/RefCountedObjectImpl.h index edce04ae..0103fa14 100644 --- a/Common/interface/RefCountedObjectImpl.h +++ b/Common/interface/RefCountedObjectImpl.h @@ -193,7 +193,7 @@ public: // The only other two methods that lock the object are ReleaseStrongRef() // and ReleaseWeakRef(), which are never called by QueryInterface() auto *pWrapper = reinterpret_cast<ObjectWrapperBase*>(m_ObjectWrapperBuffer); - pWrapper->QueryInterface(Diligent::IID_Unknown, ppObject); + pWrapper->QueryInterface(IID_Unknown, ppObject); } Atomics::AtomicDecrement(m_lNumStrongReferences); } @@ -225,7 +225,7 @@ private: { public: virtual void DestroyObject() = 0; - virtual void QueryInterface( const Diligent::INTERFACE_ID &iid, IObject **ppInterface )=0; + virtual void QueryInterface(const INTERFACE_ID& iid, IObject** ppInterface)=0; }; template<typename ObjectType, typename AllocatorType> @@ -248,7 +248,7 @@ private: delete m_pObject; } } - virtual void QueryInterface( const Diligent::INTERFACE_ID &iid, IObject **ppInterface )override final + virtual void QueryInterface(const INTERFACE_ID& iid, IObject** ppInterface)override final { return m_pObject->QueryInterface(iid, ppInterface); } |
