Collections implicit cast constructor fix
This one prohibits annoying casts. It is also important for future context injection and follows STL practice.
This commit is contained in:
@@ -52,7 +52,7 @@ public:
|
||||
/// Initializes a new instance of the <see cref="Array"/> class.
|
||||
/// </summary>
|
||||
/// <param name="capacity">The initial capacity.</param>
|
||||
Array(int32 capacity)
|
||||
explicit Array(int32 capacity)
|
||||
: _count(0)
|
||||
, _capacity(capacity)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
/// Initializes a new instance of the <see cref="BitArray"/> class.
|
||||
/// </summary>
|
||||
/// <param name="capacity">The initial capacity.</param>
|
||||
BitArray(const int32 capacity)
|
||||
explicit BitArray(const int32 capacity)
|
||||
: _count(0)
|
||||
, _capacity(capacity)
|
||||
{
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
/// Initializes a new instance of the <see cref="Dictionary"/> class.
|
||||
/// </summary>
|
||||
/// <param name="capacity">The initial capacity.</param>
|
||||
Dictionary(const int32 capacity)
|
||||
explicit Dictionary(const int32 capacity)
|
||||
{
|
||||
SetCapacity(capacity);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
/// Initializes a new instance of the <see cref="HashSet"/> class.
|
||||
/// </summary>
|
||||
/// <param name="capacity">The initial capacity.</param>
|
||||
HashSet(const int32 capacity)
|
||||
explicit HashSet(const int32 capacity)
|
||||
{
|
||||
SetCapacity(capacity);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
/// Initializes a new instance of the <see cref="RenderListBuffer"/> class.
|
||||
/// </summary>
|
||||
/// <param name="capacity">The initial capacity.</param>
|
||||
RenderListBuffer(int32 capacity)
|
||||
explicit RenderListBuffer(int32 capacity)
|
||||
: _count(0)
|
||||
, _capacity(capacity)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user