Commit 5d302339 authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Code formatting (() initializers -> {})

parent 0e51276e
Pipeline #51 passed with stage
in 1 minute and 37 seconds
......@@ -33,14 +33,14 @@ namespace dxup {
uint8_t flags
)
: m_adapterNum{ adapterNum }
, m_adapter(adapter)
, m_adapter{ adapter }
, m_window{ window }
, m_device(device)
, m_context(context)
, m_parent(parent)
, m_device{ device }
, m_context{ context }
, m_parent{ parent }
, m_behaviourFlags{ behaviourFlags }
, m_flags(flags)
, m_deviceType(deviceType)
, m_flags{ flags }
, m_deviceType{ deviceType }
, m_state{ new D3D9State(this, 0) }
, m_stateBlock{ nullptr } {
m_renderer = new D3D9ImmediateRenderer{ device, context, m_state };
......
......@@ -3,8 +3,7 @@
namespace dxup {
UINT bitsPerPixel(DXGI_FORMAT fmt)
{
UINT bitsPerPixel(DXGI_FORMAT fmt) {
switch (fmt) {
case DXGI_FORMAT_R32G32B32A32_TYPELESS:
case DXGI_FORMAT_R32G32B32A32_FLOAT:
......
......@@ -8,7 +8,7 @@ namespace dxup {
public:
Direct3D9Ex(IDXGIFactory1* dxgiFactory)
: m_dxgiFactory(dxgiFactory)
: m_dxgiFactory{ dxgiFactory }
{}
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID* ppv) override;
......
......@@ -6,8 +6,8 @@
namespace dxup {
Direct3DQuery9::Direct3DQuery9(Direct3DDevice9Ex* device, D3DQUERYTYPE type)
: D3D9DeviceUnknown<IDirect3DQuery9>(device)
, m_type(type) {
: D3D9DeviceUnknown<IDirect3DQuery9>{ device }
, m_type{ type } {
bool doD3D11Query = true;
switch (m_type) {
case D3DQUERYTYPE_EVENT: m_d3d11Type = D3D11_QUERY_EVENT; break;
......
......@@ -21,7 +21,7 @@ namespace dxup {
: m_shader { shader }
, m_shaderNum{ shaderNum }
, m_translation{ translation }
, D3D9DeviceUnknown<Base>(device) {
, D3D9DeviceUnknown<Base>{device} {
m_dx9asm.resize(dx9asm::byteCodeLength((const uint32_t*)code));
......
......@@ -7,14 +7,13 @@
namespace dxup {
Direct3DSurface9::Direct3DSurface9(bool singletonSurface, UINT slice, UINT mip, Direct3DDevice9Ex* device, IUnknown* container, DXUPResource* resource, const D3D9ResourceDesc& desc)
: Direct3DSurface9Base(device, nullptr, desc)
, m_container(container)
, m_slice(slice)
, m_mip(mip)
, m_rtView(nullptr)
, m_rtViewSRGB(nullptr)
, m_singletonSurface(singletonSurface)
, m_useRect(false)
: Direct3DSurface9Base{ device, nullptr, desc }
, m_container{ container }
, m_slice{ slice }
, m_mip{ mip }
, m_rtView{ nullptr }
, m_rtViewSRGB{ nullptr }
, m_singletonSurface{ singletonSurface }
{
if (singletonSurface && m_container != nullptr)
m_container->AddRef();
......
......@@ -51,7 +51,6 @@ namespace dxup {
Com<ID3D11RenderTargetView> m_rtViewSRGB;
Com<ID3D11DepthStencilView> m_dsView;
bool m_useRect;
bool m_singletonSurface;
UINT m_slice;
......
......@@ -7,8 +7,8 @@
namespace dxup {
Direct3DSwapChain9Ex::Direct3DSwapChain9Ex(Direct3DDevice9Ex* device, D3DPRESENT_PARAMETERS* presentationParameters, IDXGISwapChain1* swapchain)
: Direct3DSwapChain9ExBase(device)
, m_swapchain(swapchain)
: Direct3DSwapChain9ExBase{ device }
, m_swapchain{ swapchain }
, m_rtRequired{ false } {
this->Reset(presentationParameters);
}
......
......@@ -15,7 +15,7 @@ namespace dxup {
public:
Direct3DGeneric2DTexture9(bool singletonSurface, Direct3DDevice9Ex* device, DXUPResource* resource, const D3D9ResourceDesc& desc)
: Direct3DResource9<ResourceType, ID3D9BaseType>(device, resource, desc)
: Direct3DResource9<ResourceType, ID3D9BaseType>{ device, resource, desc }
, m_singletonSurface{ singletonSurface } {
m_surfaces.reserve(resource->GetSubresources());
......
......@@ -11,7 +11,7 @@ namespace dxup {
public:
Direct3DVertexDeclaration9(Direct3DDevice9Ex* device, std::vector<D3D11_INPUT_ELEMENT_DESC>& d3d11Descs, std::vector<D3DVERTEXELEMENT9>& d3d9Descs)
: D3D9DeviceUnknown<IDirect3DVertexDeclaration9>(device)
: D3D9DeviceUnknown<IDirect3DVertexDeclaration9>{ device }
, m_d3d11Descs{ d3d11Descs }
, m_d3d9Descs{ d3d9Descs } { }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment