Format engine codebase with ReSharper
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
class Crc
|
||||
{
|
||||
public:
|
||||
|
||||
// Helper lookup table with cached CRC values.
|
||||
static uint32 CachedCRCTablesSB8[8][256];
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
class Delaunay2D
|
||||
{
|
||||
public:
|
||||
|
||||
struct Triangle
|
||||
{
|
||||
int32 Indices[3];
|
||||
@@ -125,7 +124,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
struct Edge
|
||||
{
|
||||
int32 Indices[2];
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
class FLAXENGINE_API Encryption
|
||||
{
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Encrypt bytes with custom data
|
||||
/// </summary>
|
||||
@@ -26,7 +25,6 @@ public:
|
||||
static void DecryptBytes(byte* data, uint64 size);
|
||||
|
||||
public:
|
||||
|
||||
static int32 Base64EncodeLength(int32 size);
|
||||
static int32 Base64DecodeLength(const char* encoded, int32 length);
|
||||
static void Base64Encode(const byte* bytes, int32 size, Array<char>& encoded);
|
||||
|
||||
@@ -24,7 +24,6 @@ class CaptureScreenshot : public ThreadPoolTask
|
||||
{
|
||||
friend Screenshot;
|
||||
private:
|
||||
|
||||
TextureData _data;
|
||||
GPUTextureReference _texture;
|
||||
ScriptingObjectReference<RenderTask> _renderTask;
|
||||
@@ -32,7 +31,6 @@ private:
|
||||
DateTime _startTime;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CaptureScreenshot"/> class.
|
||||
/// </summary>
|
||||
@@ -60,7 +58,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the texture data container.
|
||||
/// </summary>
|
||||
@@ -71,7 +68,6 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// [ThreadPoolTask]
|
||||
bool Run() override;
|
||||
void OnFail() override;
|
||||
|
||||
@@ -14,7 +14,7 @@ class GPUTexture;
|
||||
/// </summary>
|
||||
API_CLASS(Static) class FLAXENGINE_API Screenshot
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(Screenshot);
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(Screenshot);
|
||||
|
||||
/// <summary>
|
||||
/// Captures the specified render target contents and saves it to the file.
|
||||
|
||||
@@ -14,11 +14,9 @@ class FLAXENGINE_API State
|
||||
friend StateMachine;
|
||||
|
||||
protected:
|
||||
|
||||
StateMachine* _parent;
|
||||
|
||||
protected:
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
/// </summary>
|
||||
@@ -31,7 +29,6 @@ protected:
|
||||
~State();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// State's activity
|
||||
/// </summary>
|
||||
@@ -58,7 +55,6 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
virtual void enterState()
|
||||
{
|
||||
}
|
||||
@@ -76,12 +72,10 @@ class FLAXENGINE_API StateMachine
|
||||
friend State;
|
||||
|
||||
protected:
|
||||
|
||||
State* _currentState;
|
||||
Array<State*> _states;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
/// </summary>
|
||||
@@ -93,7 +87,6 @@ public:
|
||||
virtual ~StateMachine();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets current state
|
||||
/// </summary>
|
||||
@@ -113,7 +106,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Go to state
|
||||
/// </summary>
|
||||
@@ -130,6 +122,5 @@ public:
|
||||
virtual void GoToState(State* state);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void switchState(State* nextState);
|
||||
};
|
||||
|
||||
@@ -9,20 +9,17 @@ template<typename CharType, int InlinedSize = 128>
|
||||
class StringAsBase
|
||||
{
|
||||
protected:
|
||||
|
||||
const CharType* _static = nullptr;
|
||||
CharType* _dynamic = nullptr;
|
||||
CharType _inlined[InlinedSize];
|
||||
|
||||
public:
|
||||
|
||||
~StringAsBase()
|
||||
{
|
||||
Allocator::Free(_dynamic);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
const CharType* Get() const
|
||||
{
|
||||
return _static ? _static : (_dynamic ? _dynamic : _inlined);
|
||||
@@ -38,12 +35,10 @@ template<int InlinedSize = 128>
|
||||
class StringAsANSI : public StringAsBase<char, InlinedSize>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef char CharType;
|
||||
typedef StringAsBase<CharType, InlinedSize> Base;
|
||||
|
||||
public:
|
||||
|
||||
StringAsANSI(const char* text)
|
||||
{
|
||||
this->_static = text;
|
||||
@@ -74,12 +69,10 @@ template<int InlinedSize = 128>
|
||||
class StringAsUTF8 : public StringAsBase<char, InlinedSize>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef char CharType;
|
||||
typedef StringAsBase<CharType, InlinedSize> Base;
|
||||
|
||||
public:
|
||||
|
||||
StringAsUTF8(const char* text)
|
||||
{
|
||||
this->_static = text;
|
||||
@@ -110,12 +103,10 @@ template<int InlinedSize = 128>
|
||||
class StringAsUTF16 : public StringAsBase<Char, InlinedSize>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Char CharType;
|
||||
typedef StringAsBase<CharType, InlinedSize> Base;
|
||||
|
||||
public:
|
||||
|
||||
StringAsUTF16(const char* text)
|
||||
: StringAsUTF16(text, StringUtils::Length(text))
|
||||
{
|
||||
|
||||
@@ -14,19 +14,16 @@
|
||||
class FLAXENGINE_API TextProcessing : public NonCopyable
|
||||
{
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Separator structure
|
||||
/// </summary>
|
||||
struct SeparatorData
|
||||
{
|
||||
public:
|
||||
|
||||
char C0;
|
||||
char C1;
|
||||
|
||||
public:
|
||||
|
||||
SeparatorData()
|
||||
: C0(0)
|
||||
, C1(0)
|
||||
@@ -52,7 +49,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool IsWhiteSpace() const
|
||||
{
|
||||
return *this == SeparatorData('\r', '\n')
|
||||
@@ -62,7 +58,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool operator==(const SeparatorData& other) const
|
||||
{
|
||||
return C0 == other.C0 && C1 == other.C1;
|
||||
@@ -80,13 +75,11 @@ public:
|
||||
struct Token
|
||||
{
|
||||
public:
|
||||
|
||||
const char* Start;
|
||||
int32 Length;
|
||||
SeparatorData Separator;
|
||||
|
||||
public:
|
||||
|
||||
Token()
|
||||
: Start(nullptr)
|
||||
, Length(0)
|
||||
@@ -135,14 +128,12 @@ public:
|
||||
}*/
|
||||
|
||||
public:
|
||||
|
||||
StringAnsi ToString() const
|
||||
{
|
||||
return StringAnsi(Start, Length);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
FORCE_INLINE bool Equals(const Token& other) const
|
||||
{
|
||||
return Equals(other.Start, other.Length);
|
||||
@@ -159,7 +150,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
FORCE_INLINE bool EqualsIgnoreCase(const Token& other) const
|
||||
{
|
||||
return EqualsIgnoreCase(other.Start, other.Length);
|
||||
@@ -176,7 +166,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
FORCE_INLINE bool operator==(const char* text) const
|
||||
{
|
||||
auto token = Token(text);
|
||||
@@ -195,7 +184,6 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
const char* _buffer;
|
||||
int32 _length;
|
||||
char* _cursor;
|
||||
@@ -203,7 +191,6 @@ private:
|
||||
int32 _line;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
/// </summary>
|
||||
@@ -212,7 +199,6 @@ public:
|
||||
TextProcessing(const char* input, int32 length);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Array with all token separators
|
||||
/// </summary>
|
||||
@@ -224,14 +210,12 @@ public:
|
||||
Array<char> Whitespaces;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Set separators and white chars for HLSL language
|
||||
/// </summary>
|
||||
void Setup_HLSL();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if there are still characters in the buffer and can read data from it
|
||||
/// </summary>
|
||||
@@ -260,7 +244,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Read single character from the buffer
|
||||
/// </summary>
|
||||
@@ -290,7 +273,6 @@ public:
|
||||
void ReadLine();
|
||||
|
||||
private:
|
||||
|
||||
char moveForward();
|
||||
char moveBack();
|
||||
};
|
||||
|
||||
@@ -15,11 +15,9 @@ template<typename CharType>
|
||||
class TextWriter : public Object, public NonCopyable
|
||||
{
|
||||
private:
|
||||
|
||||
MemoryWriteStream _buffer;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Init with default capacity
|
||||
/// </summary>
|
||||
@@ -37,7 +35,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets writer private buffer
|
||||
/// </summary>
|
||||
@@ -57,7 +54,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Write line terminator sign
|
||||
/// </summary>
|
||||
@@ -139,7 +135,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Clear whole data
|
||||
/// </summary>
|
||||
@@ -149,7 +144,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// [Object]
|
||||
String ToString() const override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user