зеркало из https://github.com/microsoft/DirectXTK.git
Minor cleanup issue: _declspec is the 'old' name, use __declspec instead
This commit is contained in:
Родитель
fa20d754f9
Коммит
0d481aef5e
|
@ -24,7 +24,7 @@ namespace DirectX
|
||||||
//
|
//
|
||||||
// Example usage:
|
// Example usage:
|
||||||
//
|
//
|
||||||
// _declspec(align(16)) struct MyAlignedType : public AlignedNew<MyAlignedType>
|
// __declspec(align(16)) struct MyAlignedType : public AlignedNew<MyAlignedType>
|
||||||
|
|
||||||
template<typename TDerived>
|
template<typename TDerived>
|
||||||
struct AlignedNew
|
struct AlignedNew
|
||||||
|
@ -34,7 +34,7 @@ namespace DirectX
|
||||||
{
|
{
|
||||||
const size_t alignment = __alignof(TDerived);
|
const size_t alignment = __alignof(TDerived);
|
||||||
|
|
||||||
static_assert(alignment > 8, "AlignedNew is only useful for types with > 8 byte alignment. Did you forget a _declspec(align) on TDerived?");
|
static_assert(alignment > 8, "AlignedNew is only useful for types with > 8 byte alignment. Did you forget a __declspec(align) on TDerived?");
|
||||||
|
|
||||||
void* ptr = _aligned_malloc(size, alignment);
|
void* ptr = _aligned_malloc(size, alignment);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ using namespace Microsoft::WRL;
|
||||||
|
|
||||||
|
|
||||||
// Internal SpriteBatch implementation class.
|
// Internal SpriteBatch implementation class.
|
||||||
_declspec(align(16)) class SpriteBatch::Impl : public AlignedNew<SpriteBatch::Impl>
|
__declspec(align(16)) class SpriteBatch::Impl : public AlignedNew<SpriteBatch::Impl>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Impl(_In_ ID3D11DeviceContext* deviceContext);
|
Impl(_In_ ID3D11DeviceContext* deviceContext);
|
||||||
|
@ -41,7 +41,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// Info about a single sprite that is waiting to be drawn.
|
// Info about a single sprite that is waiting to be drawn.
|
||||||
_declspec(align(16)) struct SpriteInfo : public AlignedNew<SpriteInfo>
|
__declspec(align(16)) struct SpriteInfo : public AlignedNew<SpriteInfo>
|
||||||
{
|
{
|
||||||
XMFLOAT4A source;
|
XMFLOAT4A source;
|
||||||
XMFLOAT4A destination;
|
XMFLOAT4A destination;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче