Skip to content

Commit b2ffb4d

Browse files
committed
Code-Cleanup and untabify applied
1 parent a78a016 commit b2ffb4d

11 files changed

Lines changed: 1204 additions & 1210 deletions

GlobalCode/Databases/MediumDecFormula.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ namespace BlazesRusCode
8888
int OpTargetKey;
8989
int leftKey;
9090

91-
//bool moreOperations = FormDRef.size() > 3;
92-
9391
//Applying operations via C++ variation of order of operations
9492
//https://en.cppreference.com/w/cpp/language/operator_precedence
9593
for (int opIndex = 0; opIndex < 11; ++opIndex)

GlobalCode/QuadVector/QuadVector.cpp

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
void QuadVector::StoreInVectorIndex(int index, double TempValue)
1515
{
16-
if(index == 0) { PositionX = TempValue; }
17-
else if(index == 1) { PositionY = TempValue; }
18-
else if(index == 2) { PositionZ = TempValue; }
19-
else if(index == 3) { PositionW = TempValue; }
16+
if (index == 0) { PositionX = TempValue; }
17+
else if (index == 1) { PositionY = TempValue; }
18+
else if (index == 2) { PositionZ = TempValue; }
19+
else if (index == 3) { PositionW = TempValue; }
2020
}
2121

2222
#if defined(ExcludeExperimentalCode)
@@ -26,10 +26,10 @@ MediumDec
2626
#endif
2727
QuadVector::GetVectorValue(int index)
2828
{
29-
if(index == 0) { return PositionX; }
30-
else if(index == 1) { return PositionY; }
31-
else if(index == 2) { return PositionZ; }
32-
else if(index == 3) { return PositionW; }
29+
if (index == 0) { return PositionX; }
30+
else if (index == 1) { return PositionY; }
31+
else if (index == 2) { return PositionZ; }
32+
else if (index == 3) { return PositionW; }
3333
else { return 0.0;/*Error Value but return 0.0 to prevent crash*/ }
3434
}
3535

@@ -72,8 +72,8 @@ QuadVector::ConvertToList()
7272
#else
7373
VariableList<MediumDec>
7474
#endif
75-
TempValue;
76-
for(int i = 0; i < 4; i++)
75+
TempValue;
76+
for (int i = 0; i < 4; i++)
7777
{
7878
TempValue.Add(GetVectorValue(i));
7979
}
@@ -94,23 +94,23 @@ void QuadVector::ReadQuadVectorFromString(std::string LineString)
9494
bool ScanningDouble = false;
9595
//Total size of LineString to load
9696
size_t StringSize = LineString.size();
97-
for(size_t i = 0; i < StringSize&&VectorIndex < 4; ++i)
97+
for (size_t i = 0; i < StringSize && VectorIndex < 4; ++i)
9898
{
9999
StringChar = LineString.at(i);
100-
if(StringChar == ' ' || StringChar == ' '&&PartialSearchBuffer != "")
100+
if (StringChar == ' ' || StringChar == ' ' && PartialSearchBuffer != "")
101101
{
102-
if(ScanningDouble)
102+
if (ScanningDouble)
103103
{
104104
DoubleStorageTemp = VariableConversionFunctions::ReadDoubleFromString(PartialSearchBuffer);
105105
StoreInVectorIndex(VectorIndex, DoubleStorageTemp);
106106
PartialSearchBuffer = "";
107107
VectorIndex++;
108108
}
109109
}
110-
else if(StringChar == '.' || StringChar == '0' || StringChar == '1' || StringChar == '2' || StringChar == '3' || StringChar == '4' || StringChar == '5' || StringChar == '6' || StringChar == '7' || StringChar == '8' || StringChar == '9' || StringChar == '-')
110+
else if (StringChar == '.' || StringChar == '0' || StringChar == '1' || StringChar == '2' || StringChar == '3' || StringChar == '4' || StringChar == '5' || StringChar == '6' || StringChar == '7' || StringChar == '8' || StringChar == '9' || StringChar == '-')
111111
{
112112
PartialSearchBuffer += StringChar;
113-
if(ScanningDouble == false) { ScanningDouble = true; }
113+
if (ScanningDouble == false) { ScanningDouble = true; }
114114
}
115115
}
116116
}
@@ -126,12 +126,12 @@ QuadVector::QuadVector(std::string TempString)
126126
std::string StringChar;
127127
//Vector index of value to store
128128
unsigned __int8 VectorIndex = 0;
129-
for(unsigned __int8 i = 0; i < StringLength&&VectorIndex < 4; i++)
129+
for (unsigned __int8 i = 0; i < StringLength && VectorIndex < 4; i++)
130130
{
131131
StringChar = TempString.at(i);
132-
if(StringChar == " " || StringChar == "\t" || StringChar == ")")
132+
if (StringChar == " " || StringChar == "\t" || StringChar == ")")
133133
{
134-
if(ValueExtractionBuffer != "")
134+
if (ValueExtractionBuffer != "")
135135
{
136136
//std::cout << "ValueStored:" << ValueExtractionBuffer << " VectorIndex:" << VectorIndex << "\n";
137137
DoubleStorageTemp = VariableConversionFunctions::ReadDoubleFromString(ValueExtractionBuffer);
@@ -140,7 +140,7 @@ QuadVector::QuadVector(std::string TempString)
140140
VectorIndex++;
141141
}
142142
}
143-
else if(StringChar == "." || VariableConversionFunctions::IsDigit(StringChar) || StringChar == "-")
143+
else if (StringChar == "." || VariableConversionFunctions::IsDigit(StringChar) || StringChar == "-")
144144
{
145145
ValueExtractionBuffer += StringChar;
146146
}
@@ -163,27 +163,27 @@ size_t QuadVectorList::AddData()
163163

164164
void QuadVectorList::ConvertStringToVectorList(std::string Content)
165165
{
166-
if(Size() != 0)
166+
if (Size() != 0)
167167
{
168168
Reset();
169169
}
170170
const size_t StringSize = Content.length();
171171
char CurrentChar;
172172
std::string CurrentElement = "";
173173
QuadVector CurrentElementVector;
174-
for(size_t Index=0; Index < StringSize; ++Index)
174+
for (size_t Index = 0; Index < StringSize; ++Index)
175175
{
176176
CurrentChar = Content.at(Index);
177-
if(CurrentElement == "")
177+
if (CurrentElement == "")
178178
{
179-
if(CurrentChar != '\n'&&CurrentChar != ' '&&CurrentChar != '\t'&&CurrentChar != ' ')
179+
if (CurrentChar != '\n' && CurrentChar != ' ' && CurrentChar != '\t' && CurrentChar != ' ')
180180
{
181181
CurrentElement = CurrentChar;
182182
}
183183
}
184184
else
185185
{
186-
if(CurrentChar != '\n'&&CurrentChar != ' '&&CurrentChar != '\t'&&CurrentChar != ' ')
186+
if (CurrentChar != '\n' && CurrentChar != ' ' && CurrentChar != '\t' && CurrentChar != ' ')
187187
{
188188
CurrentElement += CurrentChar;
189189
}
@@ -229,7 +229,6 @@ std::string QuadDoubleVector::ConvertToString()
229229
return TempString;
230230
}
231231

232-
233232
void QuadDoubleVector::ReadQuadVectorFromString(std::string LineString)
234233
{
235234
//Current character loaded in steam
@@ -244,10 +243,10 @@ void QuadDoubleVector::ReadQuadVectorFromString(std::string LineString)
244243
bool ScanningDouble = false;
245244
//Total size of LineString to load
246245
size_t StringSize = LineString.size();
247-
for (size_t i = 0; i < StringSize&&VectorIndex < 4; ++i)
246+
for (size_t i = 0; i < StringSize && VectorIndex < 4; ++i)
248247
{
249248
StringChar = LineString.at(i);
250-
if (StringChar == ' ' || StringChar == ' '&&PartialSearchBuffer != "")
249+
if (StringChar == ' ' || StringChar == ' ' && PartialSearchBuffer != "")
251250
{
252251
if (ScanningDouble)
253252
{
@@ -276,7 +275,7 @@ QuadDoubleVector::QuadDoubleVector(std::string TempString)
276275
std::string StringChar;
277276
//Vector index of value to store
278277
unsigned __int8 VectorIndex = 0;
279-
for (unsigned __int8 i = 0; i < StringLength&&VectorIndex < 4; i++)
278+
for (unsigned __int8 i = 0; i < StringLength && VectorIndex < 4; i++)
280279
{
281280
StringChar = TempString.at(i);
282281
if (StringChar == " " || StringChar == "\t" || StringChar == ")")
@@ -326,14 +325,14 @@ void QuadDoubleVectorList::ConvertStringToVectorList(std::string Content)
326325
CurrentChar = Content.at(Index);
327326
if (CurrentElement == "")
328327
{
329-
if (CurrentChar != '\n'&&CurrentChar != ' '&&CurrentChar != '\t'&&CurrentChar != ' ')
328+
if (CurrentChar != '\n' && CurrentChar != ' ' && CurrentChar != '\t' && CurrentChar != ' ')
330329
{
331330
CurrentElement = CurrentChar;
332331
}
333332
}
334333
else
335334
{
336-
if (CurrentChar != '\n'&&CurrentChar != ' '&&CurrentChar != '\t'&&CurrentChar != ' ')
335+
if (CurrentChar != '\n' && CurrentChar != ' ' && CurrentChar != '\t' && CurrentChar != ' ')
337336
{
338337
CurrentElement += CurrentChar;
339338
}

0 commit comments

Comments
 (0)