Merge branch '1.5' into dotnet7
This commit is contained in:
@@ -509,14 +509,14 @@ public:
|
||||
_deletedCount = _elementsCount = 0;
|
||||
if (capacity != 0 && (capacity & (capacity - 1)) != 0)
|
||||
{
|
||||
// Align capacity value to the next power of two (if it's not)
|
||||
capacity++;
|
||||
// Align capacity value to the next power of two (http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2)
|
||||
capacity--;
|
||||
capacity |= capacity >> 1;
|
||||
capacity |= capacity >> 2;
|
||||
capacity |= capacity >> 4;
|
||||
capacity |= capacity >> 8;
|
||||
capacity |= capacity >> 16;
|
||||
capacity = capacity + 1;
|
||||
capacity++;
|
||||
}
|
||||
if (capacity)
|
||||
{
|
||||
|
||||
@@ -380,14 +380,14 @@ public:
|
||||
_deletedCount = _elementsCount = 0;
|
||||
if (capacity != 0 && (capacity & (capacity - 1)) != 0)
|
||||
{
|
||||
// Align capacity value to the next power of two (if it's not)
|
||||
capacity++;
|
||||
// Align capacity value to the next power of two (http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2)
|
||||
capacity--;
|
||||
capacity |= capacity >> 1;
|
||||
capacity |= capacity >> 2;
|
||||
capacity |= capacity >> 4;
|
||||
capacity |= capacity >> 8;
|
||||
capacity |= capacity >> 16;
|
||||
capacity = capacity + 1;
|
||||
capacity++;
|
||||
}
|
||||
if (capacity)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Serialization/Serialization.h"
|
||||
#include "Engine/Content/Asset.h"
|
||||
#include "Engine/Content/AssetReference.h"
|
||||
#include "Engine/Content/SceneReference.h"
|
||||
|
||||
/// <summary>
|
||||
/// The game building rendering settings.
|
||||
@@ -50,6 +51,12 @@ public:
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(1000), EditorDisplay(\"Additional Data\")")
|
||||
Array<AssetReference<Asset>> AdditionalAssets;
|
||||
|
||||
/// <summary>
|
||||
/// The list of additional scenes to include into build (into root assets set).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(1000), EditorDisplay(\"Additional Data\")")
|
||||
Array<SceneReference> AdditionalScenes;
|
||||
|
||||
/// <summary>
|
||||
/// The list of additional folders with assets to include into build (into root assets set). Paths relative to the project directory (or absolute).
|
||||
|
||||
@@ -557,6 +557,14 @@ public:
|
||||
return count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current capacity of delegate table (amount of function to store before resizing).
|
||||
/// </summary>
|
||||
int32 Capacity() const
|
||||
{
|
||||
return (int32)Platform::AtomicRead((intptr volatile*)&_size);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether any function is binded.
|
||||
/// </summary>
|
||||
|
||||
@@ -105,14 +105,16 @@ public:
|
||||
|
||||
FORCE_INLINE int32 CalculateCapacityGrow(int32 capacity, int32 minCapacity) const
|
||||
{
|
||||
if (capacity == 0)
|
||||
if (capacity < minCapacity)
|
||||
capacity = minCapacity;
|
||||
if (capacity < 8)
|
||||
{
|
||||
capacity = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Round up to the next power of 2 and multiply by 2
|
||||
capacity++;
|
||||
// Round up to the next power of 2 and multiply by 2 (http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2)
|
||||
capacity--;
|
||||
capacity |= capacity >> 1;
|
||||
capacity |= capacity >> 2;
|
||||
capacity |= capacity >> 4;
|
||||
@@ -120,8 +122,6 @@ public:
|
||||
capacity |= capacity >> 16;
|
||||
capacity = (capacity + 1) * 2;
|
||||
}
|
||||
if (capacity < minCapacity)
|
||||
capacity = minCapacity;
|
||||
return capacity;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,22 +88,14 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
// Compares two Guids for equality
|
||||
// @param left The first Guid to compare
|
||||
// @param right The second Guid to compare
|
||||
// @returns True if the Guids are equal, otherwise false
|
||||
friend bool operator==(const Guid& left, const Guid& right)
|
||||
bool operator==(const Guid& other) const
|
||||
{
|
||||
return ((left.A ^ right.A) | (left.B ^ right.B) | (left.C ^ right.C) | (left.D ^ right.D)) == 0;
|
||||
return ((A ^ other.A) | (B ^ other.B) | (C ^ other.C) | (D ^ other.D)) == 0;
|
||||
}
|
||||
|
||||
// Compares two Guids for inequality
|
||||
// @param left The first Guid to compare
|
||||
// @param right The second Guid to compare
|
||||
// @returns True if the GUIDs are not equal, otherwise false
|
||||
friend bool operator!=(const Guid& left, const Guid& right)
|
||||
bool operator!=(const Guid& other) const
|
||||
{
|
||||
return ((left.A ^ right.A) | (left.B ^ right.B) | (left.C ^ right.C) | (left.D ^ right.D)) != 0;
|
||||
return ((A ^ other.A) | (B ^ other.B) | (C ^ other.C) | (D ^ other.D)) != 0;
|
||||
}
|
||||
|
||||
// Provides access to the GUIDs components
|
||||
|
||||
@@ -81,14 +81,14 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend bool operator==(const Pair& a, const Pair& b)
|
||||
bool operator==(const Pair& other) const
|
||||
{
|
||||
return a.First == b.First && a.Second == b.Second;
|
||||
return First == other.First && Second == other.Second;
|
||||
}
|
||||
|
||||
friend bool operator!=(const Pair& a, const Pair& b)
|
||||
bool operator!=(const Pair& other) const
|
||||
{
|
||||
return a.First != b.First || a.Second != b.Second;
|
||||
return First != other.First || Second != other.Second;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user