diff --git a/compiler/cpp/src/audit/t_audit.h b/compiler/cpp/src/audit/t_audit.h
index fd0013a..be79e31 100644
--- a/compiler/cpp/src/audit/t_audit.h
+++ b/compiler/cpp/src/audit/t_audit.h
@@ -2,10 +2,13 @@
 #define T_AUDIT_H
 
 void compare_namespace(t_program* newProgram, t_program* oldProgram);
-void compare_enums(const std::vector<t_enum*>& newEnumList, const std::vector<t_enum*>& oldEnumList);
+void compare_enums(const std::vector<t_enum*>& newEnumList,
+                   const std::vector<t_enum*>& oldEnumList);
 bool compare_defaults(t_const_value* newStructDefault, t_const_value* oldStructDefault);
-void compare_structs(const std::vector<t_struct*>& newStructList, const std::vector<t_struct*>& oldStructList);
-void compare_services(const std::vector<t_service*>& newServices, const std::vector<t_service*>& oldServices);
+void compare_structs(const std::vector<t_struct*>& newStructList,
+                     const std::vector<t_struct*>& oldStructList);
+void compare_services(const std::vector<t_service*>& newServices,
+                      const std::vector<t_service*>& oldServices);
 void compare_consts(const std::vector<t_const*>& newConst, const std::vector<t_const*>& oldConst);
 
 #endif
diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc b/compiler/cpp/src/generate/t_cpp_generator.cc
index 91c5b29..8770ade 100644
--- a/compiler/cpp/src/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/generate/t_cpp_generator.cc
@@ -1625,11 +1625,10 @@
 
   f_header_ << endl << ns_open_ << endl << endl;
 
-  f_header_ <<
-    "#ifdef _WIN32\n"
-    "  #pragma warning( push )\n"
-    "  #pragma warning (disable : 4250 ) //inheriting methods via dominance \n"
-    "#endif\n\n";
+  f_header_ << "#ifdef _WIN32\n"
+               "  #pragma warning( push )\n"
+               "  #pragma warning (disable : 4250 ) //inheriting methods via dominance \n"
+               "#endif\n\n";
 
   // Service implementation file includes
   string f_service_name = get_out_dir() + svcname + ".cpp";
@@ -1682,10 +1681,9 @@
     generate_service_async_skeleton(tservice);
   }
 
-  f_header_ <<
-    "#ifdef _WIN32\n"
-    "  #pragma warning( pop )\n"
-    "#endif\n\n";
+  f_header_ << "#ifdef _WIN32\n"
+               "  #pragma warning( pop )\n"
+               "#endif\n\n";
 
   // Close the namespace
   f_service_ << ns_close_ << endl << endl;
@@ -2151,12 +2149,10 @@
   }
 
   // Generate the header portion
-  if(style == "Concurrent")
-  {
-    f_header_ << 
-      "// The \'concurrent\' client is a thread safe client that correctly handles\n"
-      "// out of order responses.  It is slower than the regular client, so should\n"
-      "// only be used when you need to share a connection among multiple threads\n";
+  if (style == "Concurrent") {
+    f_header_ << "// The \'concurrent\' client is a thread safe client that correctly handles\n"
+                 "// out of order responses.  It is slower than the regular client, so should\n"
+                 "// only be used when you need to share a connection among multiple threads\n";
   }
   f_header_ << template_header << "class " << service_name_ << style << "Client" << short_suffix
             << " : "
@@ -2270,36 +2266,34 @@
   for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
     indent(f_header_) << function_signature(*f_iter, ifstyle) << ";" << endl;
     // TODO(dreiss): Use private inheritance to avoid generating thise in cob-style.
-    if(style == "Concurrent" && !(*f_iter)->is_oneway()) {
+    if (style == "Concurrent" && !(*f_iter)->is_oneway()) {
       // concurrent clients need to move the seqid from the send function to the
       // recv function.  Oneway methods don't have a recv function, so we don't need to
       // move the seqid for them.  Attempting to do so would result in a seqid leak.
       t_function send_function(g_type_i32, /*returning seqid*/
-          string("send_") + (*f_iter)->get_name(),
-          (*f_iter)->get_arglist());
+                               string("send_") + (*f_iter)->get_name(),
+                               (*f_iter)->get_arglist());
       indent(f_header_) << function_signature(&send_function, "") << ";" << endl;
-    }
-    else {
+    } else {
       t_function send_function(g_type_void,
-          string("send_") + (*f_iter)->get_name(),
-          (*f_iter)->get_arglist());
+                               string("send_") + (*f_iter)->get_name(),
+                               (*f_iter)->get_arglist());
       indent(f_header_) << function_signature(&send_function, "") << ";" << endl;
     }
     if (!(*f_iter)->is_oneway()) {
-      if(style == "Concurrent") {
+      if (style == "Concurrent") {
         t_field seqIdArg(g_type_i32, "seqid");
         t_struct seqIdArgStruct(program_);
         seqIdArgStruct.append(&seqIdArg);
         t_function recv_function((*f_iter)->get_returntype(),
-            string("recv_") + (*f_iter)->get_name(),
-            &seqIdArgStruct);
+                                 string("recv_") + (*f_iter)->get_name(),
+                                 &seqIdArgStruct);
         indent(f_header_) << function_signature(&recv_function, "") << ";" << endl;
-      }
-      else {
+      } else {
         t_struct noargs(program_);
         t_function recv_function((*f_iter)->get_returntype(),
-            string("recv_") + (*f_iter)->get_name(),
-            &noargs);
+                                 string("recv_") + (*f_iter)->get_name(),
+                                 &noargs);
         indent(f_header_) << function_signature(&recv_function, "") << ";" << endl;
       }
     }
@@ -2410,7 +2404,7 @@
 
     // if (style != "Cob") // TODO(dreiss): Libify the client and don't generate this for cob-style
     if (true) {
-      t_type *send_func_return_type = g_type_void;
+      t_type* send_func_return_type = g_type_void;
       if (style == "Concurrent" && !(*f_iter)->is_oneway()) {
         send_func_return_type = g_type_i32;
       }
@@ -2431,7 +2425,7 @@
       string resultname = tservice->get_name() + "_" + (*f_iter)->get_name() + "_presult";
 
       string cseqidVal = "0";
-      if(style == "Concurrent") {
+      if (style == "Concurrent") {
         if (!(*f_iter)->is_oneway()) {
           cseqidVal = "this->sync_.generateSeqId()";
         }
@@ -2461,13 +2455,10 @@
           << "oprot_->getTransport()->flush();" << endl;
 
       if (style == "Concurrent") {
-        out <<
-          endl <<
-          indent() << "sentry.commit();" << endl;
+        out << endl << indent() << "sentry.commit();" << endl;
 
-        if(!(*f_iter)->is_oneway()) {
-          out <<
-            indent() << "return cseqid;" << endl;
+        if (!(*f_iter)->is_oneway()) {
+          out << indent() << "return cseqid;" << endl;
         }
       }
       scope_down(out);
@@ -2481,8 +2472,8 @@
         t_struct seqIdArgStruct(program_);
         seqIdArgStruct.append(&seqIdArg);
 
-        t_struct *recv_function_args = &noargs;
-        if(style == "Concurrent") {
+        t_struct* recv_function_args = &noargs;
+        if (style == "Concurrent") {
           recv_function_args = &seqIdArgStruct;
         }
 
@@ -2653,7 +2644,7 @@
                              "TApplicationException::MISSING_RESULT, \"" << (*f_iter)->get_name()
               << " failed: unknown result\");" << endl;
         }
-        if(style == "Concurrent") {
+        if (style == "Concurrent") {
           indent_down();
           indent_down();
           out <<
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");
diff --git a/compiler/cpp/src/main.h b/compiler/cpp/src/main.h
index 4933432..8751dd5 100644
--- a/compiler/cpp/src/main.h
+++ b/compiler/cpp/src/main.h
@@ -100,7 +100,7 @@
  * Emits a one-time warning on byte type, promoting the new i8 type instead
  */
 void emit_byte_type_warning();
-	
+
 /**
  * Flex utilities
  */
