Skip to content

Commit 359f949

Browse files
committed
Formatting fixes.
1 parent d27564c commit 359f949

8 files changed

Lines changed: 54 additions & 54 deletions

File tree

src/base/sc_benchmark.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ benchmark::~benchmark()
9494
if(!stopped) {
9595
stop();
9696
if(debug) {
97-
std::cerr << "benchmark::~benchmark(): stop was not called before destructor!" << std::endl;
97+
std::cerr << "benchmark::~benchmark(): stop was not called before destructor!" << std::endl;
9898
}
9999
out();
100100
}
101-
if (benchVals_str) {
102-
free((void *)benchVals_str);
103-
benchVals_str = NULL;
101+
if(benchVals_str) {
102+
free((void *)benchVals_str);
103+
benchVals_str = NULL;
104104
}
105105
}
106106

@@ -146,17 +146,17 @@ const char *benchmark::str()
146146

147147
void benchmark::out()
148148
{
149-
std::cout << str() << std::endl;
149+
std::cout << str() << std::endl;
150150
}
151151

152152
const char *benchmark::str(const benchVals &bv)
153153
{
154154
std::stringstream ss;
155155
ss << " Physical memory: " << bv.physMemKB << "kb; Virtual memory: " << bv.virtMemKB;
156156
ss << "kb; User CPU time: " << bv.userMilliseconds << "ms; System CPU time: " << bv.sysMilliseconds << "ms";
157-
if (benchVals_str) {
158-
free((void *)benchVals_str);
159-
benchVals_str = NULL;
157+
if(benchVals_str) {
158+
free((void *)benchVals_str);
159+
benchVals_str = NULL;
160160
}
161161
benchVals_str = (char *)calloc(ss.str().length() + 1, sizeof(char));
162162
snprintf(benchVals_str, ss.str().length(), "%s", ss.str().c_str());

src/base/sc_benchmark.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class SC_BASE_EXPORT benchmark
4242
protected:
4343
benchVals initialVals, laterVals;
4444
bool debug, stopped;
45-
char *benchVals_str = NULL;
45+
char *benchVals_str = NULL;
4646

4747
public:
4848
benchmark(bool debugMessages = true);

src/clstepcore/STEPattribute.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ class SC_CORE_EXPORT STEPattribute
105105
ErrorDescriptor _error;
106106
STEPattribute *_redefAttr;
107107
public:
108-
const AttrDescriptor *aDesc;
108+
const AttrDescriptor *aDesc;
109109

110110
protected:
111-
int refCount;
111+
int refCount;
112112

113113
char SkipBadAttr(istream &in, char *StopChars);
114114
void AddErrorInfo();

src/clstepcore/sdaiApplication_instance.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -703,8 +703,8 @@ SDAI_Application_instance *ReadEntityRef(istream &in, ErrorDescriptor *err, cons
703703
case '@':
704704
err->AppendToDetailMsg("Use of @ instead of # to identify entity.\n");
705705
err->GreaterSeverity(SEVERITY_WARNING);
706-
// no break statement here on purpose
707-
[[gnu::fallthrough]];
706+
// no break statement here on purpose
707+
[[gnu::fallthrough]];
708708
case '#': {
709709
int id = -1;
710710
in >> id;
@@ -914,11 +914,11 @@ Severity EntityValidLevel(const char *attrValue, // string contain entity ref
914914
if((found1 > 0) || (found2 > 0)) {
915915
if((found1 == 2) || (found2 == 2)) {
916916
int ocnt = snprintf(messageBuf, BUFSIZ,
917-
" Attribute's Entity Reference %s is %s data \'%s\'.\n",
918-
attrValue, "followed by invalid", tmp);
919-
if (ocnt < BUFSIZ) {
920-
fprintf(stderr, "Warning - truncation of Attribute's Entry Reference msg\n");
921-
}
917+
" Attribute's Entity Reference %s is %s data \'%s\'.\n",
918+
attrValue, "followed by invalid", tmp);
919+
if(ocnt < BUFSIZ) {
920+
fprintf(stderr, "Warning - truncation of Attribute's Entry Reference msg\n");
921+
}
922922
err->AppendToUserMsg(messageBuf);
923923
err->AppendToDetailMsg(messageBuf);
924924
err->GreaterSeverity(SEVERITY_WARNING);

src/exp2cxx/classes_wrapper.cc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -424,18 +424,18 @@ void SCHEMAprint(Schema schema, FILES *files, void *complexCol, int suffix)
424424
sprintf(schnm, "%s%s", SCHEMA_FILE_PREFIX, StrToUpper(SCHEMAget_name(schema))); //TODO change file names to CamelCase?
425425
if(suffix == 0) {
426426
ocnt = snprintf(sufnm, MAX_LEN, "%s", schnm);
427-
if (ocnt > MAX_LEN) {
428-
std::cerr << "Warning - classes_wrapper.cc line 425 - sufnm not large enough to hold schnm\n";
429-
}
427+
if(ocnt > MAX_LEN) {
428+
std::cerr << "Warning - classes_wrapper.cc line 425 - sufnm not large enough to hold schnm\n";
429+
}
430430
} else {
431431
ocnt = snprintf(sufnm, MAX_LEN, "%s_%d", schnm, suffix);
432-
if (ocnt > MAX_LEN) {
433-
std::cerr << "Warning - classes_wrapper.cc line 430 - sufnm not large enough to hold string\n";
434-
}
432+
if(ocnt > MAX_LEN) {
433+
std::cerr << "Warning - classes_wrapper.cc line 430 - sufnm not large enough to hold string\n";
434+
}
435435
}
436436
ocnt = snprintf(fnm, MAX_LEN, "%s.h", sufnm);
437-
if (ocnt > MAX_LEN) {
438-
std::cerr << "Warning - classes_wrapper.cc line 436 - sufnm not large enough to hold string\n";
437+
if(ocnt > MAX_LEN) {
438+
std::cerr << "Warning - classes_wrapper.cc line 436 - sufnm not large enough to hold string\n";
439439
}
440440

441441
if(!(incfile = (files -> inc) = FILEcreate(fnm))) {
@@ -478,8 +478,8 @@ void SCHEMAprint(Schema schema, FILES *files, void *complexCol, int suffix)
478478

479479
// 3. header for namespace to contain all formerly-global variables
480480
ocnt = snprintf(fnm, MAX_LEN, "%sNames.h", schnm);
481-
if (ocnt > MAX_LEN) {
482-
std::cerr << "Warning - classes_wrapper.cc line 480 - fnm not large enough to hold schnm\n";
481+
if(ocnt > MAX_LEN) {
482+
std::cerr << "Warning - classes_wrapper.cc line 480 - fnm not large enough to hold schnm\n";
483483
}
484484

485485
if(!(files->names = FILEcreate(fnm))) {
@@ -497,9 +497,9 @@ void SCHEMAprint(Schema schema, FILES *files, void *complexCol, int suffix)
497497
if(suffix <= 1) {
498498
/* I.e., if this is our first pass with schema */
499499
ocnt = snprintf(fnm, MAX_LEN, "%s.init.cc", schnm);
500-
if (ocnt > MAX_LEN) {
501-
std::cerr << "Warning - classes_wrapper.cc line 499 - fnm not large enough to hold string\n";
502-
}
500+
if(ocnt > MAX_LEN) {
501+
std::cerr << "Warning - classes_wrapper.cc line 499 - fnm not large enough to hold string\n";
502+
}
503503

504504
/* Note - We use schnm (without the "_x" suffix sufnm has) since we
505505
** only generate a single init.cc file. */
@@ -563,12 +563,12 @@ void SCHEMAprint(Schema schema, FILES *files, void *complexCol, int suffix)
563563
fprintf(files->classes, "\n#include \"%sNames.h\"\n", schnm);
564564
} else {
565565
/* Just reopen the .init.cc (in append mode): */
566-
ocnt = snprintf(fnm, MAX_LEN, "%s.init.cc", schnm);
567-
if (ocnt > MAX_LEN) {
568-
std::cerr << "Warning - classes_wrapper.cc line 558 - sufnm not large enough to hold string\n";
569-
}
566+
ocnt = snprintf(fnm, MAX_LEN, "%s.init.cc", schnm);
567+
if(ocnt > MAX_LEN) {
568+
std::cerr << "Warning - classes_wrapper.cc line 558 - sufnm not large enough to hold string\n";
569+
}
570570

571-
initfile = files->init = fopen(fnm, "a");
571+
initfile = files->init = fopen(fnm, "a");
572572
}
573573

574574
/********** record in files relating to entire input ***********/

src/exp2cxx/selects.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@ void TYPEselect_lib_print_part_three(const Type type, FILE *f, char *classnm)
11131113

11141114
/* get methods */
11151115
TYPEselect_lib_part_three_getter(type, classnm, attrnm, utype, uent, funcnm, items, a, uattr, ent, f, false);
1116-
/* TODO - This isn't good enough - the compiler warning Wignored-qualifiers is picking up
1117-
* a lot of spurious const expressions coming from these outputs. Not sure of the pattern
1118-
* yet, but it looks like not all attrIsObj entities should be using it. */
1116+
/* TODO - This isn't good enough - the compiler warning Wignored-qualifiers is picking up
1117+
* a lot of spurious const expressions coming from these outputs. Not sure of the pattern
1118+
* yet, but it looks like not all attrIsObj entities should be using it. */
11191119
if(attrIsObj(VARget_type(a))) {
11201120
TYPEselect_lib_part_three_getter(type, classnm, attrnm, utype, uent, funcnm, items, a, uattr, ent, f, true);
11211121
}

src/exp2python/src/classes_wrapper_python.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ void SCHEMAprint(Schema schema, FILES *files, int suffix)
165165
sprintf(sufnm, "%s", schnm);
166166
} else {
167167
ocnt = snprintf(sufnm, MAX_LEN, "%s_%d", schnm, suffix);
168-
if (ocnt > MAX_LEN) {
169-
std::cerr << "Warning - classes_wrapper_python.cc - sufnm not large enough to hold string\n";
170-
}
168+
if(ocnt > MAX_LEN) {
169+
std::cerr << "Warning - classes_wrapper_python.cc - sufnm not large enough to hold string\n";
170+
}
171171
}
172172
ocnt = snprintf(fnm, MAX_LEN, "%s.h", sufnm);
173-
if (ocnt > MAX_LEN) {
174-
std::cerr << "Warning - classes_wrapper_python.cc - fnm not large enough to hold string\n";
173+
if(ocnt > MAX_LEN) {
174+
std::cerr << "Warning - classes_wrapper_python.cc - fnm not large enough to hold string\n";
175175
}
176176

177177
np = fnm + strlen(fnm) - 1; /* point to end of constant part of string */

src/express/expr.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ static int EXP_resolve_op_dot_fuzzy(Type selection, Symbol sref, Expression *e,
239239
*dt = DICT_type;
240240
return 1;
241241
} else {
242-
return 0;
243-
}
242+
return 0;
243+
}
244244
default:
245245
return 0;
246246
}
@@ -327,8 +327,8 @@ Type EXPresolve_op_dot(Expression expr, Scope scope)
327327
} else {
328328
fprintf(stderr, "EXPresolved_op_dot: attribute not an attribute?\n");
329329
ERRORabort(0);
330-
return(Type_Bad);
331-
}
330+
return(Type_Bad);
331+
}
332332
default:
333333
/* compile-time ambiguous */
334334
if(where) {
@@ -615,13 +615,13 @@ void EXPresolve_op_default(Expression e, Scope s)
615615
{
616616
int failed = 0;
617617

618-
if (OPget_number_of_operands(e->e.op_code) == 3) {
619-
EXPresolve(e->e.op3, s, Type_Dont_Care);
620-
failed = is_resolve_failed(e->e.op3);
618+
if(OPget_number_of_operands(e->e.op_code) == 3) {
619+
EXPresolve(e->e.op3, s, Type_Dont_Care);
620+
failed = is_resolve_failed(e->e.op3);
621621
}
622-
if (OPget_number_of_operands(e->e.op_code) == 2) {
623-
EXPresolve(e->e.op2, s, Type_Dont_Care);
624-
failed |= is_resolve_failed(e->e.op2);
622+
if(OPget_number_of_operands(e->e.op_code) == 2) {
623+
EXPresolve(e->e.op2, s, Type_Dont_Care);
624+
failed |= is_resolve_failed(e->e.op2);
625625
}
626626
EXPresolve(e->e.op1, s, Type_Dont_Care);
627627
if(failed || is_resolve_failed(e->e.op1)) {

0 commit comments

Comments
 (0)