THRIFT-5766 Replace std::endl with "\n"
Patch: Carel Combrink

This closes #2943
diff --git a/test/cpp/src/StressTestNonBlocking.cpp b/test/cpp/src/StressTestNonBlocking.cpp
index e94ecb2..d9d9ae6 100644
--- a/test/cpp/src/StressTestNonBlocking.cpp
+++ b/test/cpp/src/StressTestNonBlocking.cpp
@@ -152,7 +152,7 @@
       loopEchoString();
       break;
     default:
-      cerr << "Unexpected loop type" << _loopType << endl;
+      cerr << "Unexpected loop type" << _loopType << '\n';
       break;
     }
 
@@ -253,24 +253,20 @@
 
   usage << argv[0] << " [--port=<port number>] [--server] [--server-type=<server-type>] "
                       "[--protocol-type=<protocol-type>] [--workers=<worker-count>] "
-                      "[--clients=<client-count>] [--loop=<loop-count>]" << endl
+                      "[--clients=<client-count>] [--loop=<loop-count>]" << '\n'
         << "\tclients        Number of client threads to create - 0 implies no clients, i.e. "
-           "server only.  Default is " << clientCount << endl
-        << "\thelp           Prints this help text." << endl
-        << "\tcall           Service method to call.  Default is " << callName << endl
-        << "\tloop           The number of remote thrift calls each client makes.  Default is "
-        << loopCount << endl << "\tport           The port the server and clients should bind to "
-                                "for thrift network connections.  Default is " << port << endl
-        << "\tserver         Run the Thrift server in this process.  Default is " << runServer
-        << endl << "\tserver-type    Type of server, \"simple\" or \"thread-pool\".  Default is "
-        << serverType << endl
-        << "\tprotocol-type  Type of protocol, \"binary\", \"ascii\", or \"xml\".  Default is "
-        << protocolType << endl
-        << "\tlog-request    Log all request to ./requestlog.tlog. Default is " << logRequests
-        << endl << "\treplay-request Replay requests from log file (./requestlog.tlog) Default is "
-        << replayRequests << endl << "\tworkers        Number of thread pools workers.  Only valid "
-                                     "for thread-pool server type.  Default is " << workerCount
-        << endl;
+                            "server only.  Default is " << clientCount << '\n'
+        << "\thelp           Prints this help text." << '\n'
+        << "\tcall           Service method to call.  Default is " << callName << '\n'
+        << "\tloop           The number of remote thrift calls each client makes.  Default is " << loopCount << '\n'
+        << "\tport           The port the server and clients should bind to for thrift network "
+                            "connections.  Default is " << port << '\n'
+        << "\tserver         Run the Thrift server in this process.  Default is " << runServer << '\n'
+        << "\tserver-type    Type of server, \"simple\" or \"thread-pool\".  Default is " << serverType << '\n'
+        << "\tprotocol-type  Type of protocol, \"binary\", \"ascii\", or \"xml\".  Default is " << protocolType << '\n'
+        << "\tlog-request    Log all request to ./requestlog.tlog. Default is " << logRequests << '\n'
+        << "\treplay-request Replay requests from log file (./requestlog.tlog) Default is " << replayRequests << '\n'
+        << "\tworkers        Number of thread pools workers.  Only valid for thread-pool server type.  Default is " << workerCount << '\n';
 
   map<string, string> args;
 
@@ -338,7 +334,7 @@
     }
 
   } catch (std::exception& e) {
-    cerr << e.what() << endl;
+    cerr << e.what() << '\n';
     cerr << usage.str();
   }
 
@@ -416,7 +412,7 @@
           new TNonblockingServer(serviceProcessor, protocolFactory, nbSocket2, threadManager)));
     }
 
-    cerr << "Starting the server on port " << port << " and " << (port + 1) << endl;
+    cerr << "Starting the server on port " << port << " and " << (port + 1) << '\n';
     serverThread->start();
     serverThread2->start();
 
@@ -475,7 +471,7 @@
       Synchronized s(monitor);
       threadCount = clientCount;
 
-      cerr << "Launch " << clientCount << " client threads" << endl;
+      cerr << "Launch " << clientCount << " client threads" << '\n';
 
       time00 = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
 
@@ -528,14 +524,14 @@
     averageTime /= clientCount;
 
     cout << "workers :" << workerCount << ", client : " << clientCount << ", loops : " << loopCount
-         << ", rate : " << (clientCount * loopCount * 1000) / ((double)(time01 - time00)) << endl;
+         << ", rate : " << (clientCount * loopCount * 1000) / ((double)(time01 - time00)) << '\n';
 
     count_map count = serviceHandler->getCount();
     count_map::iterator iter;
     for (iter = count.begin(); iter != count.end(); ++iter) {
       printf("%s => %d\n", iter->first, iter->second);
     }
-    cerr << "done." << endl;
+    cerr << "done." << '\n';
   }
 
   return 0;