Browse Source

Add spaces after declarations into ArrayList class

pull/8/head
Anton Tarasenko 2 years ago
parent
commit
184bdf247a
  1. 13
      sources/Data/Collections/ArrayList.uc
  2. 1
      sources/Data/Collections/ArrayListIterator.uc

13
sources/Data/Collections/ArrayList.uc

@ -390,6 +390,7 @@ public final function ArrayList RemoveItem(
optional bool onlyFirstItem) optional bool onlyFirstItem)
{ {
local int i; local int i;
while (i < storedObjects.length) while (i < storedObjects.length)
{ {
if (AreEqual(storedObjects[i], item)) if (AreEqual(storedObjects[i], item))
@ -417,6 +418,7 @@ public final function ArrayList RemoveItem(
public final function int Find(AcediaObject item) public final function int Find(AcediaObject item)
{ {
local int i; local int i;
if (item != none && !item.IsAllocated()) { if (item != none && !item.IsAllocated()) {
item = none; item = none;
} }
@ -433,6 +435,7 @@ protected function AcediaObject GetByText(BaseText key)
{ {
local int index, consumed; local int index, consumed;
local Parser parser; local Parser parser;
parser = _.text.Parse(key); parser = _.text.Parse(key);
parser.MUnsignedInteger(index,,, consumed); parser.MUnsignedInteger(index,,, consumed);
if (!parser.Ok()) if (!parser.Ok())
@ -481,6 +484,7 @@ public final function bool GetBool(int index, optional bool defaultValue)
local AcediaObject result; local AcediaObject result;
local BoolBox asBox; local BoolBox asBox;
local BoolRef asRef; local BoolRef asRef;
result = BorrowItem(index); result = BorrowItem(index);
if (result == none) { if (result == none) {
return defaultValue; return defaultValue;
@ -543,6 +547,7 @@ public final function byte GetByte(int index, optional byte defaultValue)
local AcediaObject result; local AcediaObject result;
local ByteBox asBox; local ByteBox asBox;
local ByteRef asRef; local ByteRef asRef;
result = BorrowItem(index); result = BorrowItem(index);
if (result == none) { if (result == none) {
return defaultValue; return defaultValue;
@ -605,6 +610,7 @@ public final function int GetInt(int index, optional int defaultValue)
local AcediaObject result; local AcediaObject result;
local IntBox asBox; local IntBox asBox;
local IntRef asRef; local IntRef asRef;
result = BorrowItem(index); result = BorrowItem(index);
if (result == none) { if (result == none) {
return defaultValue; return defaultValue;
@ -667,6 +673,7 @@ public final function float GetFloat(int index, optional float defaultValue)
local AcediaObject result; local AcediaObject result;
local FloatBox asBox; local FloatBox asBox;
local FloatRef asRef; local FloatRef asRef;
result = BorrowItem(index); result = BorrowItem(index);
if (result == none) { if (result == none) {
return defaultValue; return defaultValue;
@ -724,6 +731,7 @@ public final function ArrayList SetFloat(
public final function BaseText GetBaseText(int index) public final function BaseText GetBaseText(int index)
{ {
local BaseText result; local BaseText result;
result = BaseText(BorrowItem(index)); result = BaseText(BorrowItem(index));
if (result != none) { if (result != none) {
result.NewRef(); result.NewRef();
@ -746,6 +754,7 @@ public final function BaseText GetBaseText(int index)
public final function Text GetText(int index) public final function Text GetText(int index)
{ {
local Text result; local Text result;
result = Text(BorrowItem(index)); result = Text(BorrowItem(index));
if (result != none) { if (result != none) {
result.NewRef(); result.NewRef();
@ -767,6 +776,7 @@ public final function Text GetText(int index)
public final function MutableText GetMutableText(int index) public final function MutableText GetMutableText(int index)
{ {
local MutableText result; local MutableText result;
result = MutableText(BorrowItem(index)); result = MutableText(BorrowItem(index));
if (result != none) { if (result != none) {
result.NewRef(); result.NewRef();
@ -790,6 +800,7 @@ public final function MutableText GetMutableText(int index)
public final function AssociativeArray GetAssociativeArray(int index) public final function AssociativeArray GetAssociativeArray(int index)
{ {
local AssociativeArray result; local AssociativeArray result;
result = AssociativeArray(BorrowItem(index)); result = AssociativeArray(BorrowItem(index));
if (result != none) { if (result != none) {
result.NewRef(); result.NewRef();
@ -813,6 +824,7 @@ public final function AssociativeArray GetAssociativeArray(int index)
public final function DynamicArray GetDynamicArray(int index) public final function DynamicArray GetDynamicArray(int index)
{ {
local DynamicArray result; local DynamicArray result;
result = DynamicArray(BorrowItem(index)); result = DynamicArray(BorrowItem(index));
if (result != none) { if (result != none) {
result.NewRef(); result.NewRef();
@ -836,6 +848,7 @@ public final function DynamicArray GetDynamicArray(int index)
public final function ArrayList GetArrayList(int index) public final function ArrayList GetArrayList(int index)
{ {
local ArrayList result; local ArrayList result;
result = ArrayList(BorrowItem(index)); result = ArrayList(BorrowItem(index));
if (result != none) { if (result != none) {
result.NewRef(); result.NewRef();

1
sources/Data/Collections/ArrayListIterator.uc

@ -49,6 +49,7 @@ public function LeaveOnlyNotNone()
public function Iter Next(optional bool deprecated) public function Iter Next(optional bool deprecated)
{ {
local int collectionLength; local int collectionLength;
if (!skipNoneReferences) if (!skipNoneReferences)
{ {
currentIndex += 1; currentIndex += 1;

Loading…
Cancel
Save