Skip to content

Commit 26637b3

Browse files
committed
Remove redundant std:: thoughout the repository
1 parent 9d001d5 commit 26637b3

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/core/authenticator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ bool Authenticator::auth(const string &password) {
7373
return true;
7474
}
7575

76-
void Authenticator::record(const std::string &password, uint64_t download, uint64_t upload) {
76+
void Authenticator::record(const string &password, uint64_t download, uint64_t upload) {
7777
if (!is_valid_password(password)) {
7878
return;
7979
}
@@ -82,7 +82,7 @@ void Authenticator::record(const std::string &password, uint64_t download, uint6
8282
}
8383
}
8484

85-
bool Authenticator::is_valid_password(const std::string &password) {
85+
bool Authenticator::is_valid_password(const string &password) {
8686
if (password.size() != PASSWORD_LENGTH) {
8787
return false;
8888
}
@@ -102,8 +102,8 @@ Authenticator::~Authenticator() {
102102

103103
Authenticator::Authenticator(const Config&) {}
104104
bool Authenticator::auth(const string&) { return true; }
105-
void Authenticator::record(const std::string&, uint64_t, uint64_t) {}
106-
bool Authenticator::is_valid_password(const std::string&) { return true; }
105+
void Authenticator::record(const string&, uint64_t, uint64_t) {}
106+
bool Authenticator::is_valid_password(const string&) { return true; }
107107
Authenticator::~Authenticator() {}
108108

109109
#endif // ENABLE_MYSQL

src/core/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void Config::load(const string &filename) {
3232
populate(tree);
3333
}
3434

35-
void Config::populate(const std::string &JSON) {
35+
void Config::populate(const string &JSON) {
3636
istringstream s(JSON);
3737
ptree tree;
3838
read_json(s, tree);

src/proto/trojanrequest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int TrojanRequest::parse(const string &data) {
4040
return data.length();
4141
}
4242

43-
std::string TrojanRequest::generate(const std::string &password, const std::string &domainname, uint16_t port, bool tcp) {
43+
string TrojanRequest::generate(const string &password, const string &domainname, uint16_t port, bool tcp) {
4444
string ret = password + "\r\n";
4545
if (tcp) {
4646
ret += '\x01';

src/session/serversession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void ServerSession::in_recv(const string &data) {
163163
if (alpn_out == NULL) {
164164
return config.remote_port;
165165
}
166-
auto it = config.ssl.alpn_port_override.find(std::string(alpn_out, alpn_out + alpn_len));
166+
auto it = config.ssl.alpn_port_override.find(string(alpn_out, alpn_out + alpn_len));
167167
return it == config.ssl.alpn_port_override.end() ? config.remote_port : it->second;
168168
}());
169169
if (valid) {

0 commit comments

Comments
 (0)