Remove all occurrences of "using std::string".

BUG=webrtc:7104
NOTRY=True

Review-Url: https://codereview.webrtc.org/2675723002
Cr-Commit-Position: refs/heads/master@{#16418}
This commit is contained in:
ehmaldonado 2017-02-02 08:10:00 -08:00 committed by Commit bot
parent e372d3c519
commit 1dffc62843
10 changed files with 18 additions and 31 deletions

View File

@ -18,7 +18,6 @@
using google::RegisterFlagValidator;
using google::ParseCommandLineFlags;
using std::string;
using testing::InitGoogleTest;
namespace webrtc {

View File

@ -13,7 +13,6 @@
using google::RegisterFlagValidator;
using google::ParseCommandLineFlags;
using std::string;
using testing::InitGoogleTest;
namespace webrtc {

View File

@ -14,7 +14,6 @@
using google::RegisterFlagValidator;
using google::ParseCommandLineFlags;
using std::string;
using testing::InitGoogleTest;
namespace webrtc {

View File

@ -18,7 +18,6 @@
using google::RegisterFlagValidator;
using google::ParseCommandLineFlags;
using std::string;
using testing::InitGoogleTest;
namespace webrtc {

View File

@ -18,8 +18,6 @@
#include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h"
#include "webrtc/test/testsupport/fileutils.h"
using std::string;
namespace webrtc {
namespace test {
@ -29,7 +27,7 @@ const int kInitSeed = 0x12345678;
const int kPacketLossTimeUnitMs = 10;
// Common validator for file names.
static bool ValidateFilename(const string& value, bool write) {
static bool ValidateFilename(const std::string& value, bool write) {
FILE* fid = write ? fopen(value.c_str(), "wb") : fopen(value.c_str(), "rb");
if (fid == nullptr)
return false;
@ -38,7 +36,7 @@ static bool ValidateFilename(const string& value, bool write) {
}
// Define switch for input file name.
static bool ValidateInFilename(const char* flagname, const string& value) {
static bool ValidateInFilename(const char* flagname, const std::string& value) {
if (!ValidateFilename(value, false)) {
printf("Invalid input filename.");
return false;
@ -82,7 +80,8 @@ static const bool channels_dummy =
RegisterFlagValidator(&FLAGS_channels, &ValidateChannels);
// Define switch for output file name.
static bool ValidateOutFilename(const char* flagname, const string& value) {
static bool ValidateOutFilename(const char* flagname,
const std::string& value) {
if (!ValidateFilename(value, true)) {
printf("Invalid output filename.");
return false;

View File

@ -24,8 +24,6 @@
#include "webrtc/modules/remote_bitrate_estimator/test/packet_sender.h"
#include "webrtc/test/testsupport/fileutils.h"
using std::string;
namespace webrtc {
namespace testing {
namespace bwe {

View File

@ -22,7 +22,6 @@
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/test/testsupport/perf_test.h"
using std::string;
using std::vector;
namespace webrtc {
@ -113,8 +112,9 @@ BweTest::~BweTest() {
void BweTest::SetUp() {
const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
string test_name =
string(test_info->test_case_name()) + "_" + string(test_info->name());
std::string test_name =
std::string(test_info->test_case_name()) + "_" +
std::string(test_info->name());
BWE_TEST_LOGGING_GLOBAL_CONTEXT(test_name);
BWE_TEST_LOGGING_GLOBAL_ENABLE(false);
}
@ -181,10 +181,10 @@ void BweTest::RunFor(int64_t time_ms) {
}
}
string BweTest::GetTestName() const {
std::string BweTest::GetTestName() const {
const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
return string(test_info->name());
return std::string(test_info->name());
}
void BweTest::PrintResults(double max_throughput_kbps,

View File

@ -26,8 +26,6 @@
namespace webrtc {
namespace test {
using std::string;
ResultsContainer::ResultsContainer() {}
ResultsContainer::~ResultsContainer() {}
@ -44,13 +42,13 @@ int GetI420FrameSize(int width, int height) {
int ExtractFrameSequenceNumber(std::string line) {
size_t space_position = line.find(' ');
if (space_position == string::npos) {
if (space_position == std::string::npos) {
return -1;
}
std::string frame = line.substr(0, space_position);
size_t underscore_position = frame.find('_');
if (underscore_position == string::npos) {
if (underscore_position == std::string::npos) {
return -1;
}
std::string frame_number = frame.substr(underscore_position + 1);
@ -60,7 +58,7 @@ int ExtractFrameSequenceNumber(std::string line) {
int ExtractDecodedFrameNumber(std::string line) {
size_t space_position = line.find(' ');
if (space_position == string::npos) {
if (space_position == std::string::npos) {
return -1;
}
std::string decoded_number = line.substr(space_position + 1);
@ -70,7 +68,7 @@ int ExtractDecodedFrameNumber(std::string line) {
bool IsThereBarcodeError(std::string line) {
size_t barcode_error_position = line.find("Barcode error");
if (barcode_error_position != string::npos) {
if (barcode_error_position != std::string::npos) {
return true;
}
return false;

View File

@ -18,13 +18,11 @@
#include "webrtc/tools/frame_editing/frame_editing_lib.h"
#include "webrtc/typedefs.h"
using std::string;
namespace webrtc {
int EditFrames(const string& in_path, int width, int height,
int EditFrames(const std::string& in_path, int width, int height,
int first_frame_to_process, int interval,
int last_frame_to_process, const string& out_path) {
int last_frame_to_process, const std::string& out_path) {
if (last_frame_to_process < first_frame_to_process) {
fprintf(stderr, "The set of frames to cut is empty! (l < f)\n");
return -10;

View File

@ -18,8 +18,6 @@
namespace webrtc {
namespace test {
using std::string;
CommandLineParser::CommandLineParser() {}
CommandLineParser::~CommandLineParser() {}
@ -28,7 +26,7 @@ void CommandLineParser::Init(int argc, char** argv) {
}
bool CommandLineParser::IsStandaloneFlag(std::string flag) {
return flag.find("=") == string::npos;
return flag.find("=") == std::string::npos;
}
bool CommandLineParser::IsFlagWellFormed(std::string flag) {
@ -55,7 +53,7 @@ bool CommandLineParser::IsFlagWellFormed(std::string flag) {
std::string CommandLineParser::GetCommandLineFlagName(std::string flag) {
size_t dash_pos = flag.find("--");
size_t equal_pos = flag.find("=");
if (equal_pos == string::npos) {
if (equal_pos == std::string::npos) {
return flag.substr(dash_pos + 2);
} else {
return flag.substr(dash_pos + 2, equal_pos - 2);
@ -64,7 +62,7 @@ std::string CommandLineParser::GetCommandLineFlagName(std::string flag) {
std::string CommandLineParser::GetCommandLineFlagValue(std::string flag) {
size_t equal_pos = flag.find("=");
if (equal_pos == string::npos) {
if (equal_pos == std::string::npos) {
return "";
} else {
return flag.substr(equal_pos + 1);