Skip to content

Commit e28665b

Browse files
committed
fix: address misleading indentation warnings
1 parent 125f3f4 commit e28665b

9 files changed

Lines changed: 55 additions & 55 deletions

File tree

trans_compete/SIDD_3R.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ bool SIDD_3R::Search_Low3RE()
126126
}
127127
}
128128
}
129-
130-
if (results)
129+
130+
if (results)
131131
cout << "Number of three-run states = " << count << endl;
132132
StatesInThreeRuns = (long)count;
133133
ZsumB += sum_3RB;

trans_compete/SIDD_4R.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ bool SIDD_4R::Search_Low4RE()
7070
if(Lst_OBE[n1][t1].begin()->get_energy() + min_RE[t2] + min_RE[t3]+ min_RE[t4] + minGres >= max_E)
7171
continue;
7272
for(int n2 = n1; n2 <= (window_size - n1)/3 ; n2++){
73-
if (n1==n2 && t1==1 && t2==0)
74-
continue;
73+
if (n1==n2 && t1==1 && t2==0)
74+
continue;
7575
if(Lst_OBE[n1][t1].begin()->get_energy() + Lst_OBE[n2][t2].begin()->get_energy()+ min_RE[t3] + min_RE[t4] + minGres >= max_E)
7676
continue;
7777
for(int n3 = n2; n3 <= (window_size - n1 - n2)/2; n3++){

trans_compete/SIDD_Base.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SIDD_Base::SIDD_Base()
3232
en_cruciforms = 0;
3333
for (int t=0; t<=Ns; t++) {
3434
profile[t] = 0;
35-
for(int m = 0; m <= MaxInitialWindowSize; m++) {
35+
for(int m = 0; m <= MaxInitialWindowSize; m++) {
3636
promatrix[m][t] = 0;
3737
}
3838
}
@@ -246,8 +246,8 @@ double SIDD_Base::prepare_sequence(std::string sequence) {
246246
void SIDD_Base::prepare_cruciforms() {
247247
string str1 = cr_string;
248248
size_t found1 = 0;
249-
int IR[2] = {0, 0};
250-
double energy = 0.0;
249+
int IR[2] = {0, 0};
250+
double energy = 0.0;
251251
int pos1 = 0;
252252
int pos2 = 0;
253253
string str2;
@@ -276,16 +276,16 @@ void SIDD_Base::prepare_cruciforms() {
276276
if(found2!=string::npos) {
277277
str3 = str2.substr(pos2,found2-pos2);
278278
pos2 = int(found2)+1;
279-
if (i == 2)
280-
energy = atof(str3.c_str());
281-
else if (i < 2)
279+
if (i == 2)
280+
energy = atof(str3.c_str());
281+
else if (i < 2)
282282
IR[i] = atoi(str3.c_str());
283283
i++;
284284
}
285285
}
286-
if (i == 3 && IR[0] > 0 && IR[0] <= length_seq &&
287-
IR[1] > 0 && IR[1] <= MaxWindowSize)
288-
en_cruciforms[IR[0]-1][IR[1]] = energy;
286+
if (i == 3 && IR[0] > 0 && IR[0] <= length_seq &&
287+
IR[1] > 0 && IR[1] <= MaxWindowSize)
288+
en_cruciforms[IR[0]-1][IR[1]] = energy;
289289
pos1 = int(found1)+1;
290290
}
291291
}
@@ -836,11 +836,11 @@ void SIDD_Base::calc_profile()
836836
// V: The following lines is just a search of the maximum Gx for each transition, to substitute the Infinite.
837837
maxGx = profile[1][0].get_ave_Gx();
838838
for(int t=0; t<=Ns; t++) {
839-
for(int j = 1; j < length_seq; j++){
840-
if(maxGx < profile[t][j].get_ave_Gx()){
841-
maxGx = profile[t][j].get_ave_Gx(); // find max Gx
842-
}
843-
}
839+
for(int j = 1; j < length_seq; j++){
840+
if(maxGx < profile[t][j].get_ave_Gx()){
841+
maxGx = profile[t][j].get_ave_Gx(); // find max Gx
842+
}
843+
}
844844
}
845845
// V: This is for the substitution.
846846
for(int t=0; t<=Ns; t++) {
@@ -860,11 +860,11 @@ void SIDD_Base::sum_open()
860860
sumn[t]+=profile[t][i].get_px();
861861
}
862862
}
863-
if (results) {
864-
cout << "N_Melting = " << sumn[0] << endl;
865-
cout << "N_Z = " << sumn[1] << endl;
866-
cout << "N_Cruciform = " << sumn[2] << endl;
867-
}
863+
if (results) {
864+
cout << "N_Melting = " << sumn[0] << endl;
865+
cout << "N_Z = " << sumn[1] << endl;
866+
cout << "N_Cruciform = " << sumn[2] << endl;
867+
}
868868
}
869869

870870
void SIDD_Base::get_column_header() {

trans_compete/qsidd.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ int main(int argc, char* argv[])
161161
cerr << "sidd.initializer failed" << endl;
162162
exit(1);
163163
}
164-
if (sidd.get_Flag_PEA()) sidd.assign_pea(energy);
164+
if (sidd.get_Flag_PEA()) sidd.assign_pea(energy);
165165

166166
if (threshold < 9)
167167
cout << "WARNING: threshold is too small, results may be inaccurate"<< endl;
168-
if (threshold > 15)
168+
if (threshold > 15)
169169
cout << "WARNING: threshold is too high, execution time may be very long"<< endl;
170-
if (stress_level > 0.15 || stress_level < -0.15)
170+
if (stress_level > 0.15 || stress_level < -0.15)
171171
cout << "WARNING: superhelical density is outside of physiological range"<< endl;
172172
if (temperature < 220 || temperature > 320)
173173
cout << "WARNING: temperature is outside of physiological range"<< endl;

trans_three/SIDD_1R.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ bool SIDD_1R::Search_Low1RE()
9090

9191
ZsumB = sum_1RB + closed;
9292
ZsumG = sum_1RG+alpha*alpha*K/2*closed;
93-
if (write_profile && results)
93+
if (write_profile && results)
9494
cout << "Number of one-run states = " << count << endl;
9595
return flag_minE1;
9696
}

trans_three/SIDD_2R.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ bool SIDD_2R::Search_Low2RE()
9797
StatesInTwoRuns = count;
9898
ZsumB += sum_2RB;
9999
ZsumG +=sum_2RG;
100-
101-
if (results)
100+
101+
if (results)
102102
cout << "Number of two-run states = " << count << endl;
103103
return flag_minE2;
104104
}

trans_three/SIDD_3R.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ bool SIDD_3R::Search_Low3RE()
100100
}
101101
}
102102
}
103-
if (results)
103+
if (results)
104104
cout << "Number of three-run states = " << count << endl;
105105
StatesInThreeRuns = (long)count;
106106
ZsumB += sum_3RB;

trans_three/SIDD_Base.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SIDD_Base::SIDD_Base()
3232
plasmid_seq = 0;
3333
en_cruciforms = 0;
3434
profile = 0;
35-
for(int m = 0; m <= MaxInitialWindowSize; m++)
35+
for(int m = 0; m <= MaxInitialWindowSize; m++)
3636
promatrix[m] = 0;
3737
R = 8.314/(4.2*1000.0); // gas constant
3838
C = 3.6; // stiffness constant
@@ -240,8 +240,8 @@ double SIDD_Base::prepare_sequence(std::string sequence) {
240240
void SIDD_Base::prepare_cruciforms() {
241241
string str1 = cr_string;
242242
size_t found1 = 0;
243-
int IR[2] = {0, 0};
244-
double energy = 0.0;
243+
int IR[2] = {0, 0};
244+
double energy = 0.0;
245245
int pos1 = 0;
246246
int pos2 = 0;
247247
string str2;
@@ -267,16 +267,16 @@ void SIDD_Base::prepare_cruciforms() {
267267
if(found2!=string::npos) {
268268
str3 = str2.substr(pos2,found2-pos2);
269269
pos2 = int(found2)+1;
270-
if (i == 2)
271-
energy = atof(str3.c_str());
272-
else if (i < 2)
270+
if (i == 2)
271+
energy = atof(str3.c_str());
272+
else if (i < 2)
273273
IR[i] = atoi(str3.c_str());
274274
i++;
275275
}
276276
}
277-
if (i == 3 && IR[0] > 0 && IR[0] <= length_seq &&
278-
IR[1] > 0 && IR[1] <= MaxWindowSize)
279-
en_cruciforms[IR[0]-1][IR[1]] = energy;
277+
if (i == 3 && IR[0] > 0 && IR[0] <= length_seq &&
278+
IR[1] > 0 && IR[1] <= MaxWindowSize)
279+
en_cruciforms[IR[0]-1][IR[1]] = energy;
280280
pos1 = int(found1)+1;
281281
}
282282
}
@@ -837,17 +837,17 @@ void SIDD_Base::calc_profile()
837837

838838
void SIDD_Base::sum_open()
839839
{
840-
double sumn=0.0;
841-
for(int i = 0; i < length_seq; i++)
842-
sumn+=profile[i].get_px();
843-
if (results) {
844-
if (EnergyType == Z_DNA)
845-
cout << "Number of Z-DNA bases = " << sumn << endl;
846-
else if (EnergyType == Cruciform)
847-
cout << "Number of cruciform bases = " << sumn << endl;
848-
else
849-
cout << "Number of melted bases = " << sumn << endl;
850-
}
840+
double sumn=0.0;
841+
for(int i = 0; i < length_seq; i++)
842+
sumn+=profile[i].get_px();
843+
if (results) {
844+
if (EnergyType == Z_DNA)
845+
cout << "Number of Z-DNA bases = " << sumn << endl;
846+
else if (EnergyType == Cruciform)
847+
cout << "Number of cruciform bases = " << sumn << endl;
848+
else
849+
cout << "Number of melted bases = " << sumn << endl;
850+
}
851851
}
852852

853853
void SIDD_Base::get_column_header()
@@ -956,7 +956,7 @@ void SIDD_Base::show_parameter()
956956
cout << "Energetics: Melting - nearest neighbor energetics\n";
957957
else if (EnergyType == Z_DNA)
958958
cout << "Transition: Z-DNA\n";
959-
else if (EnergyType == Cruciform)
959+
else if (EnergyType == Cruciform)
960960
cout << "Transition: Cruciform\n";
961961
if(MoleculeType == Circular)
962962
cout << "Molecule type: circular DNA\n";

trans_three/qsidd.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,18 +160,18 @@ int main(int argc, char* argv[])
160160
}
161161
sidd.set_Flag_PEA(energy);
162162
}
163-
164-
if (!sidd.initializer(dnasequence.str().c_str(),length)) {
163+
164+
if (!sidd.initializer(dnasequence.str().c_str(),length)) {
165165
cerr << "sidd.initializer failed" << endl;
166-
exit(1);
166+
exit(1);
167167
}
168168
if (sidd.get_Flag_PEA()) sidd.assign_pea(energy);
169169

170170
if (threshold < 9)
171171
cout << "WARNING: threshold is too small, results may be inaccurate"<< endl;
172172
if (threshold > 15)
173173
cout << "WARNING: threshold is too high, execution time may be very long"<< endl;
174-
if (stress_level > 0.15 || stress_level < -0.15)
174+
if (stress_level > 0.15 || stress_level < -0.15)
175175
cout << "WARNING: superhelical density is outside of physiological range"<< endl;
176176
if (temperature < 220 || temperature > 320)
177177
cout << "WARNING: temperature is outside of physiological range"<< endl;

0 commit comments

Comments
 (0)