some 'some make style' suggestions applied to C++ files
diff --git a/compiler/cpp/src/main.cc b/compiler/cpp/src/main.cc
index 6e5258b..0674594 100644
--- a/compiler/cpp/src/main.cc
+++ b/compiler/cpp/src/main.cc
@@ -642,20 +642,20 @@
}
}
-
static bool g_byte_warning_emitted = false;
/**
* Emits a one-time warning on byte type, promoting the new i8 type instead
*/
void emit_byte_type_warning() {
- if( ! g_byte_warning_emitted) {
- pwarning(1, "The \"byte\" type is a compatibility alias for \"i8\". Use \"i8\" to emphasize the signedness of this type.\n");
- g_byte_warning_emitted = true;
- }
+ if (!g_byte_warning_emitted) {
+ pwarning(1,
+ "The \"byte\" type is a compatibility alias for \"i8\". Use \"i8\" to emphasize the "
+ "signedness of this type.\n");
+ g_byte_warning_emitted = true;
+ }
}
-
/**
* Prints the version number
*/
@@ -1025,17 +1025,19 @@
}
}
-void audit(t_program* new_program, t_program* old_program, string new_thrift_include_path, string old_thrift_include_path)
-{
+void audit(t_program* new_program,
+ t_program* old_program,
+ string new_thrift_include_path,
+ string old_thrift_include_path) {
vector<string> temp_incl_searchpath = g_incl_searchpath;
- if(!old_thrift_include_path.empty()) {
+ if (!old_thrift_include_path.empty()) {
g_incl_searchpath.push_back(old_thrift_include_path);
}
parse(old_program, NULL);
g_incl_searchpath = temp_incl_searchpath;
- if(!new_thrift_include_path.empty()) {
+ if (!new_thrift_include_path.empty()) {
g_incl_searchpath.push_back(new_thrift_include_path);
}
@@ -1154,7 +1156,7 @@
failure("Could not open input file with realpath: %s", arg);
}
old_input_file = string(old_thrift_file_rp);
- } else if(strcmp(arg, "-audit-nofatal") == 0){
+ } else if (strcmp(arg, "-audit-nofatal") == 0) {
g_audit_fatal = false;
} else if (strcmp(arg, "-Iold") == 0) {
arg = argv[++i];
@@ -1165,9 +1167,9 @@
old_thrift_include_path = string(arg);
} else if (strcmp(arg, "-Inew") == 0) {
arg = argv[++i];
- if(arg == NULL) {
- fprintf(stderr, "Missing Include directory for new thrift file\n");
- usage();
+ if (arg == NULL) {
+ fprintf(stderr, "Missing Include directory for new thrift file\n");
+ usage();
}
new_thrift_include_path = string(arg);
} else {
@@ -1205,8 +1207,7 @@
g_type_i64 = new t_base_type("i64", t_base_type::TYPE_I64);
g_type_double = new t_base_type("double", t_base_type::TYPE_DOUBLE);
- if(g_audit)
- {
+ if (g_audit) {
// Audit operation
if (old_input_file.empty()) {
@@ -1231,7 +1232,7 @@
} else {
// Generate options
-
+
// You gotta generate something!
if (generator_strings.empty()) {
fprintf(stderr, "No output language(s) specified\n");