mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Normalize line endings
This commit contains only the result of `git add --renormalize .` `git show --ignore-space-change` can verify that this commit only changes whitespace.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
enum EGpAudioDriverType
|
||||
#pragma once
|
||||
|
||||
enum EGpAudioDriverType
|
||||
{
|
||||
EGpAudioDriverType_None,
|
||||
|
||||
EGpAudioDriverType_XAudio2,
|
||||
EGpAudioDriverType_SDL2,
|
||||
|
||||
EGpAudioDriverType_Count,
|
||||
};
|
||||
|
||||
EGpAudioDriverType_XAudio2,
|
||||
EGpAudioDriverType_SDL2,
|
||||
|
||||
EGpAudioDriverType_Count,
|
||||
};
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
enum EGpDisplayDriverType
|
||||
{
|
||||
#pragma once
|
||||
|
||||
enum EGpDisplayDriverType
|
||||
{
|
||||
EGpDisplayDriverType_D3D11,
|
||||
EGpDisplayDriverType_SDL_GL2,
|
||||
|
||||
EGpDisplayDriverType_Count,
|
||||
};
|
||||
EGpDisplayDriverType_SDL_GL2,
|
||||
|
||||
EGpDisplayDriverType_Count,
|
||||
};
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
enum EGpFontHandlerType
|
||||
{
|
||||
EGpFontHandlerType_None,
|
||||
EGpFontHandlerType_FreeType2,
|
||||
|
||||
{
|
||||
EGpFontHandlerType_None,
|
||||
EGpFontHandlerType_FreeType2,
|
||||
|
||||
EGpFontHandlerType_Count,
|
||||
};
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
enum EGpInputDriverType
|
||||
{
|
||||
EGpInputDriverType_XInput,
|
||||
EGpInputDriverType_SDL2_Gamepad,
|
||||
|
||||
EGpInputDriverType_Count,
|
||||
};
|
||||
#pragma once
|
||||
|
||||
enum EGpInputDriverType
|
||||
{
|
||||
EGpInputDriverType_XInput,
|
||||
EGpInputDriverType_SDL2_Gamepad,
|
||||
|
||||
EGpInputDriverType_Count,
|
||||
};
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
template<unsigned int TSize>
|
||||
class GpBitfield
|
||||
{
|
||||
{
|
||||
public:
|
||||
GpBitfield();
|
||||
GpBitfield(const GpBitfield<TSize> &other);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace GpClipboardContentsTypes
|
||||
{
|
||||
{
|
||||
enum GpClipboardContentsType
|
||||
{
|
||||
kText,
|
||||
|
@@ -1,25 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#if __cplusplus >= 199711L
|
||||
#define GP_IS_CPP11 1
|
||||
#else
|
||||
#define GP_IS_CPP11 0
|
||||
#endif
|
||||
|
||||
#if GP_IS_CPP11
|
||||
#define GP_DELETED = delete
|
||||
#else
|
||||
#ifndef nullptr
|
||||
#define nullptr 0
|
||||
#endif
|
||||
|
||||
#ifndef override
|
||||
#define override
|
||||
#endif
|
||||
|
||||
#ifndef final
|
||||
#define final
|
||||
#endif
|
||||
|
||||
#define GP_DELETED
|
||||
#endif
|
||||
#pragma once
|
||||
|
||||
#if __cplusplus >= 199711L
|
||||
#define GP_IS_CPP11 1
|
||||
#else
|
||||
#define GP_IS_CPP11 0
|
||||
#endif
|
||||
|
||||
#if GP_IS_CPP11
|
||||
#define GP_DELETED = delete
|
||||
#else
|
||||
#ifndef nullptr
|
||||
#define nullptr 0
|
||||
#endif
|
||||
|
||||
#ifndef override
|
||||
#define override
|
||||
#endif
|
||||
|
||||
#ifndef final
|
||||
#define final
|
||||
#endif
|
||||
|
||||
#define GP_DELETED
|
||||
#endif
|
||||
|
@@ -1,92 +1,92 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "GpCoreDefs.h"
|
||||
|
||||
template<class TItem, size_t TCapacity>
|
||||
class GpRingBuffer
|
||||
{
|
||||
public:
|
||||
GpRingBuffer()
|
||||
: m_Size(0)
|
||||
, m_Start(0)
|
||||
{
|
||||
}
|
||||
|
||||
TItem &operator[](size_t index)
|
||||
{
|
||||
assert(index < m_Size);
|
||||
return m_Items[(m_Start + index) % TCapacity];
|
||||
}
|
||||
|
||||
void RemoveFromStart()
|
||||
{
|
||||
assert(m_Size >= 1);
|
||||
m_Start = (m_Start + 1) % TCapacity;
|
||||
m_Size--;
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "GpCoreDefs.h"
|
||||
|
||||
template<class TItem, size_t TCapacity>
|
||||
class GpRingBuffer
|
||||
{
|
||||
public:
|
||||
GpRingBuffer()
|
||||
: m_Size(0)
|
||||
, m_Start(0)
|
||||
{
|
||||
}
|
||||
|
||||
const uint8_t *GetContiguousAtStart(size_t count)
|
||||
{
|
||||
assert(m_Size >= count);
|
||||
TItem &operator[](size_t index)
|
||||
{
|
||||
assert(index < m_Size);
|
||||
return m_Items[(m_Start + index) % TCapacity];
|
||||
}
|
||||
|
||||
void RemoveFromStart()
|
||||
{
|
||||
assert(m_Size >= 1);
|
||||
m_Start = (m_Start + 1) % TCapacity;
|
||||
m_Size--;
|
||||
}
|
||||
|
||||
const uint8_t *GetContiguousAtStart(size_t count)
|
||||
{
|
||||
assert(m_Size >= count);
|
||||
assert(m_Start + count <= TCapacity);
|
||||
const uint8_t *ptr = m_Items + m_Start;
|
||||
m_Start = (m_Start + count) % TCapacity;
|
||||
const uint8_t *ptr = m_Items + m_Start;
|
||||
m_Start = (m_Start + count) % TCapacity;
|
||||
m_Size -= count;
|
||||
|
||||
return ptr;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void RemoveCountFromStart(size_t count)
|
||||
{
|
||||
assert(m_Size >= count);
|
||||
m_Start = (m_Start + count) % TCapacity;
|
||||
m_Size -= count;
|
||||
}
|
||||
|
||||
void RemoveFromEnd()
|
||||
{
|
||||
assert(m_Size >= 1);
|
||||
m_Size--;
|
||||
void RemoveCountFromStart(size_t count)
|
||||
{
|
||||
assert(m_Size >= count);
|
||||
m_Start = (m_Start + count) % TCapacity;
|
||||
m_Size -= count;
|
||||
}
|
||||
|
||||
void RemoveCountFromEnd(size_t count)
|
||||
{
|
||||
assert(m_Size >= count);
|
||||
m_Size -= count;
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
m_Size = 0;
|
||||
m_Start = 0;
|
||||
}
|
||||
|
||||
size_t Size() const
|
||||
{
|
||||
return m_Size;
|
||||
}
|
||||
|
||||
TItem *Append()
|
||||
{
|
||||
if (m_Size == TCapacity)
|
||||
return nullptr;
|
||||
|
||||
m_Size++;
|
||||
return &m_Items[(m_Start + (m_Size - 1)) % TCapacity];
|
||||
void RemoveFromEnd()
|
||||
{
|
||||
assert(m_Size >= 1);
|
||||
m_Size--;
|
||||
}
|
||||
|
||||
void RemoveCountFromEnd(size_t count)
|
||||
{
|
||||
assert(m_Size >= count);
|
||||
m_Size -= count;
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
m_Size = 0;
|
||||
m_Start = 0;
|
||||
}
|
||||
|
||||
size_t Size() const
|
||||
{
|
||||
return m_Size;
|
||||
}
|
||||
|
||||
TItem *Append()
|
||||
{
|
||||
if (m_Size == TCapacity)
|
||||
return nullptr;
|
||||
|
||||
m_Size++;
|
||||
return &m_Items[(m_Start + (m_Size - 1)) % TCapacity];
|
||||
}
|
||||
|
||||
size_t SizeContiguous() const
|
||||
{
|
||||
{
|
||||
if (m_Size >= TCapacity - m_Start)
|
||||
return TCapacity - m_Start;
|
||||
else
|
||||
return m_Size;
|
||||
}
|
||||
|
||||
size_t AppendMultiple(size_t quantity, TItem *& outPtr)
|
||||
return m_Size;
|
||||
}
|
||||
|
||||
size_t AppendMultiple(size_t quantity, TItem *& outPtr)
|
||||
{
|
||||
if (TCapacity - m_Start > m_Size)
|
||||
{
|
||||
@@ -94,14 +94,14 @@ public:
|
||||
outPtr = m_Items + m_Start + m_Size;
|
||||
if (available < quantity)
|
||||
{
|
||||
m_Size += available;
|
||||
return available;
|
||||
m_Size += available;
|
||||
return available;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
m_Size += quantity;
|
||||
return quantity;
|
||||
}
|
||||
return quantity;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -109,21 +109,21 @@ public:
|
||||
outPtr = m_Items + ((m_Start + m_Size) % TCapacity);
|
||||
if (available < quantity)
|
||||
{
|
||||
m_Size += available;
|
||||
return available;
|
||||
m_Size += available;
|
||||
return available;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
m_Size += quantity;
|
||||
return quantity;
|
||||
return quantity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static const size_t CAPACITY = TCapacity;
|
||||
|
||||
private:
|
||||
TItem m_Items[TCapacity];
|
||||
size_t m_Size;
|
||||
size_t m_Start;
|
||||
|
||||
static const size_t CAPACITY = TCapacity;
|
||||
|
||||
private:
|
||||
TItem m_Items[TCapacity];
|
||||
size_t m_Size;
|
||||
size_t m_Start;
|
||||
};
|
||||
|
@@ -3,8 +3,8 @@
|
||||
#include "GpVector.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
template<class TChar>
|
||||
class GpString
|
||||
{
|
||||
@@ -28,7 +28,7 @@ private:
|
||||
static const size_t kStaticSize = 32;
|
||||
|
||||
GpVector<TChar, kStaticSize> m_chars;
|
||||
size_t m_length;
|
||||
size_t m_length;
|
||||
};
|
||||
|
||||
typedef GpString<char> GpCString;
|
||||
@@ -86,7 +86,7 @@ bool GpString<TChar>::Set(const GpString<TChar> &other)
|
||||
if (&other == this)
|
||||
return true;
|
||||
|
||||
return this->Set(other.Buffer(), other.m_length);
|
||||
return this->Set(other.Buffer(), other.m_length);
|
||||
}
|
||||
|
||||
template<class TChar>
|
||||
@@ -134,7 +134,7 @@ bool GpString<TChar>::Append(const GpString<TChar> &other)
|
||||
|
||||
m_length += other.m_length;
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
template<class TChar>
|
||||
|
Reference in New Issue
Block a user