evilrat666 / directx-d

[DISCONTINUED] DirectX bindings for D
MIT License
20 stars 16 forks source link

Use empty template parameter list #9

Closed marler8997 closed 5 years ago

marler8997 commented 5 years ago

I confirmed that both versions fix the undefined symbol issue. This one seems cleaner to me, up to you whether or not to pull.

evilrat666 commented 5 years ago

At this moment it may be better to just write a long template form for clarity, however I agree that it has too much repetition

template D2D1CreateDevice() {
HRESULT
D2D1CreateDevice(
    IDXGIDevice dxgiDevice,
    const D2D1_CREATION_PROPERTIES creationProperties,
    out ID2D1Device d2dDevice
    ) 
{

    return
        D2D1CreateDevice(
            dxgiDevice,
            &creationProperties,
            &d2dDevice);
}
} 

I'm merging it, but I afraid that empty parameters in short form can be a little too confusing and not recognisable for everyone.

marler8997 commented 5 years ago

Gotcha. It's mostly a preference thing. Not a big deal either way.