Stop using 'using namespace'.
This CL removes all the instances of 'using namespace' from C++ code (more info https://abseil.io/tips/153). Bug: webrtc:9855 Change-Id: Ic940fe87c5047742cfa6d60857d2f97be380ed18 Reviewed-on: https://webrtc-review.googlesource.com/c/113948 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25985}
This commit is contained in:
committed by
Commit Bot
parent
cd3929731a
commit
e10b163dd4
@ -41,8 +41,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
char inname[100], outname[100], bottleneck_file[100], vadfile[100];
|
||||
FILE *inp, *outp, *f_bn = NULL, *vadp = NULL, *bandwidthp;
|
||||
@ -425,27 +423,27 @@ int main(int argc, char* argv[]) {
|
||||
printf("Output file: %s\n\n", outname);
|
||||
if ((inp = fopen(inname, "rb")) == NULL) {
|
||||
printf(" Error iSAC Cannot read file %s.\n", inname);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((outp = fopen(outname, "wb")) == NULL) {
|
||||
printf(" Error iSAC Cannot write file %s.\n", outname);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
getc(stdin);
|
||||
exit(1);
|
||||
}
|
||||
if (VADusage) {
|
||||
if ((vadp = fopen(vadfile, "rb")) == NULL) {
|
||||
printf(" Error iSAC Cannot read file %s.\n", vadfile);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if ((bandwidthp = fopen("bwe.pcm", "wb")) == NULL) {
|
||||
printf(" Error iSAC Cannot read file %s.\n", "bwe.pcm");
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -472,7 +470,7 @@ int main(int argc, char* argv[]) {
|
||||
/* Error check */
|
||||
if (err < 0) {
|
||||
printf("\n\n Error in create.\n\n");
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
@ -508,7 +506,7 @@ int main(int argc, char* argv[]) {
|
||||
if (testNum != 1) {
|
||||
if (WebRtcIsac_EncoderInit(ISAC_main_inst, CodingMode) < 0) {
|
||||
printf("Error could not initialize the encoder \n");
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -520,7 +518,7 @@ int main(int argc, char* argv[]) {
|
||||
/* exit if returned with error */
|
||||
errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst);
|
||||
printf("\n\n Error in initialization (control): %d.\n\n", errtype);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
if (testNum == 0) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -534,7 +532,7 @@ int main(int argc, char* argv[]) {
|
||||
errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst);
|
||||
|
||||
printf("\n\n Error in Control BWE: %d.\n\n", errtype);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
@ -545,7 +543,7 @@ int main(int argc, char* argv[]) {
|
||||
/* exit if returned with error */
|
||||
errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst);
|
||||
printf("\n\n Error in SetMaxPayloadSize: %d.\n\n", errtype);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
@ -555,14 +553,14 @@ int main(int argc, char* argv[]) {
|
||||
/* exit if returned with error */
|
||||
errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst);
|
||||
printf("\n\n Error in SetMaxRateInBytes: %d.\n\n", errtype);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
*speechType = 1;
|
||||
|
||||
cout << "\n" << flush;
|
||||
std::cout << "\n" << std::flush;
|
||||
|
||||
length_file = 0;
|
||||
int16_t bnIdxTC = 0;
|
||||
@ -575,7 +573,7 @@ int main(int argc, char* argv[]) {
|
||||
if (err < 0) {
|
||||
errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst);
|
||||
printf("\n\n Error in encoderinit: %d.\n\n", errtype);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
}
|
||||
|
||||
WebRtcIsac_DecoderInit(ISAC_main_inst);
|
||||
@ -613,7 +611,7 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
printf("\nError: Streamsize out of range %d\n",
|
||||
stream_len_int - payloadSize);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
}
|
||||
|
||||
WebRtcIsac_GetUplinkBw(ISAC_main_inst, &sendBN);
|
||||
@ -671,7 +669,7 @@ int main(int argc, char* argv[]) {
|
||||
/* exit if returned with error */
|
||||
errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst);
|
||||
fprintf(stderr, "Error in encoder: %d.\n", errtype);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
exit(0);
|
||||
}
|
||||
stream_len = static_cast<size_t>(stream_len_int);
|
||||
@ -787,7 +785,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
printf("Error: in decoder: %d.", errtype);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
if (testNum == 0) {
|
||||
printf("\n\n");
|
||||
}
|
||||
@ -804,7 +802,7 @@ int main(int argc, char* argv[]) {
|
||||
printf("\n\n");
|
||||
}
|
||||
printf(" Error: in getFrameLen %d.", errtype);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
if (testNum == 0) {
|
||||
printf("\n\n");
|
||||
}
|
||||
@ -840,7 +838,7 @@ int main(int argc, char* argv[]) {
|
||||
printf("\n\n");
|
||||
}
|
||||
printf(" Error: in decoder %d.", errtype);
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
if (testNum == 0) {
|
||||
printf("\n\n");
|
||||
}
|
||||
@ -851,7 +849,7 @@ int main(int argc, char* argv[]) {
|
||||
printf("\n\n");
|
||||
}
|
||||
printf(" Error: in decoding the transcoded stream");
|
||||
cout << flush;
|
||||
std::cout << std::flush;
|
||||
if (testNum == 0) {
|
||||
printf("\n\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user